Penta-power prime seeds: Difference between revisions

added RPL
(→‎J: add)
(added RPL)
Line 806:
nine million is the 71st: 9,100,671
ten million is the 72nd: 10,347,035</pre>
 
=={{header|RPL}}==
Directly adapted from [[Quad-power prime seeds#RPL|Quad-power prime seeds]], but faster since seeds must be odd to get <code>n<sup>0</sup> + n + 1</code> primality. However, needs to be run on an emulator to get the result in around one hour.
{{works with|HP|49}}
« { } 1
'''WHILE''' OVER SIZE 30 < '''REPEAT'''
1 SF
0 4 '''FOR''' j
DUP j ^ OVER + 1 +
'''IF''' ISPRIME? NOT '''THEN''' 1 CF 4 'j' STO '''END'''
'''NEXT'''
'''IF''' 1 FS? '''THEN''' SWAP OVER + SWAP '''END '''
2 +
'''END'''
» '<span style="color:blue">TASK</span>' STO
{{out}}
<pre>
1:{1 5 69 1665 2129 25739 29631 62321 77685 80535 82655 126489 207285 211091 234359 256719 366675 407945 414099 628859 644399 770531 781109 782781 923405 1121189 1158975 1483691 1490475 1512321}
</pre>
 
=={{header|Ruby}}==
Line 821 ⟶ 840:
644399 770531 781109 782781 923405 1121189 1158975 1483691 1490475 1512321
</pre>
 
=={{header|Wren}}==
{{libheader|Wren-gmp}}
1,150

edits