Cubic special primes: Difference between revisions

Content added Content deleted
m (→‎{{header|Wren}}: Minor tidy)
(added RPL)
Line 811: Line 811:
Found 23 of the smallest primes < 15,000 such that the difference of successive terma are the smallest cubic numbers
Found 23 of the smallest primes < 15,000 such that the difference of successive terma are the smallest cubic numbers
done...
done...
</pre>

=={{header|RPL}}==
{{works with|HP|49}}
« { } 2 1
'''DO''' DUP2 3 ^ +
'''IF''' DUP ISPRIME?
'''THEN''' 4 ROLL 4 ROLL + ROT DROP SWAP 1
'''ELSE''' DROP 1 + '''END'''
'''UNTIL''' OVER 15000 > '''END'''
DROP2
» '<span style="color:blue">TASK</span>' STO
{{out}}
<pre>
1: { 2 3 11 19 83 1811 2027 2243 2251 2467 2531 2539 3539 3547 4547 5059 10891 12619 13619 13627 13691 13907 14419 }
</pre>
</pre>


Line 827: Line 842:
<pre>2 3 11 19 83 1811 2027 2243 2251 2467 2531 2539 3539 3547 4547 5059 10891 12619 13619 13627 13691 13907 14419
<pre>2 3 11 19 83 1811 2027 2243 2251 2467 2531 2539 3539 3547 4547 5059 10891 12619 13619 13627 13691 13907 14419
</pre>
</pre>

=={{header|Sidef}}==
=={{header|Sidef}}==
<syntaxhighlight lang="ruby">func cubic_primes(callback) {
<syntaxhighlight lang="ruby">func cubic_primes(callback) {