Find prime numbers of the form n*n*n+2: Difference between revisions
Content added Content deleted
(add RPL) |
|||
Line 1,622: | Line 1,622: | ||
done... |
done... |
||
</pre> |
|||
=={{header|RPL}}== |
|||
{{works with|HP|49g}} |
|||
≪ { } |
|||
1 200 '''FOR''' n |
|||
n 3 ^ 2 + |
|||
'''IF''' DUP ISPRIME? '''THEN''' + '''ELSE''' DROP '''END''' |
|||
'''NEXT''' |
|||
≫ '<span style="color:blue">TASK</span>' STO |
|||
{{out}} |
|||
<pre> |
|||
1: {3 29 127 24391 91127 250049 274627 328511 357913 571789 1157627 1442899 1860869 2146691 2924209 3581579 5000213 5177719 6751271} |
|||
</pre> |
</pre> |
||
Line 1,630: | Line 1,643: | ||
{{out}} |
{{out}} |
||
<pre>[3, 29, 127, 24391, 91127, 250049, 274627, 328511, 357913, 571789, 1157627, 1442899, 1860869, 2146691, 2924209, 3581579, 5000213, 5177719, 6751271]</pre> |
<pre>[3, 29, 127, 24391, 91127, 250049, 274627, 328511, 357913, 571789, 1157627, 1442899, 1860869, 2146691, 2924209, 3581579, 5000213, 5177719, 6751271]</pre> |
||
=={{header|Rust}}== |
=={{header|Rust}}== |
||
<syntaxhighlight lang="rust">// 202100327 Rust programming solution |
<syntaxhighlight lang="rust">// 202100327 Rust programming solution |