Least m such that n! + m is prime: Difference between revisions
Content added Content deleted
m (→{{header|RPL}}: typo) |
(→{{header|RPL}}: cleaned the code) |
||
Line 359: | Line 359: | ||
=={{header|RPL}}== |
=={{header|RPL}}== |
||
« « |
« 49 0 « ←n FACT DUP NEXTPRIME SWAP - » |
||
→ max ←n m |
|||
⚫ | |||
« m '←n' 0 max 1 SEQ |
|||
max '←n' STO |
|||
« 49 DUP <span style="color:blue">A33932</span> |
|||
'''DO''' '←n' INCR DROP m EVAL |
|||
SWAP |
|||
''' |
'''UNTIL''' 1000 > '''END''' |
||
←n |
|||
DUP FACT DUP NEXTPRIME SWAP - |
|||
⚫ | |||
'''UNTIL''' 1000 > '''END''' |
|||
» '<span style="color:blue">TASK</span>' STO |
|||
{{out}} |
{{out}} |
||
<pre> |
<pre> |