Iccanobif primes: Difference between revisions
Content deleted Content added
Added Miniscript |
add RPL |
||
Line 1,133: | Line 1,133: | ||
29: 87987175281297657706..48748727893681871587 (digits: 4270) |
29: 87987175281297657706..48748727893681871587 (digits: 4270) |
||
30: 81807376367113798363..13687506007959668569 (digits: 10527)</pre> |
30: 81807376367113798363..13687506007959668569 (digits: 10527)</pre> |
||
=={{header|RPL}}== |
|||
{{works with|HP|49}} |
|||
≪ 0 |
|||
'''WHILE''' OVER '''REPEAT''' |
|||
SWAP 10 IDIV2 |
|||
ROT 10 * + |
|||
'''END''' NIP |
|||
≫ '<span style="color:blue">REVINT</span>' STO |
|||
≪ 2 * → max |
|||
≪ { } 0 1 |
|||
DO |
|||
SWAP OVER + |
|||
DUP <span style="color:blue">REVINT</span> |
|||
'''IF''' DUP ISPRIME? '''THEN''' |
|||
DUP →STR SIZE 5 ROLL ROT + SWAP + UNROT |
|||
'''ELSE''' DROP '''END''' |
|||
'''UNTIL''' 3 PICK SIZE max ≥ '''END''' DROP2 |
|||
≫ ≫ '<span style="color:blue">ICCAN</span>' STO |
|||
15 <span style="color:blue">ICCAN</span> |
|||
{{out}} |
|||
<pre> |
|||
1: {2 1. 3 1. 5 1. 31 2. 43 2. 773 3. 7951 4. 64901 5. 52057 5. 393121 6. 56577108676171 14. 940647607443258103531 21. 5237879497657222310489731409575442761 37. 9026258083384996860449366072142307801963 40. 19900335674812302969315720344396951060628175943800862267761734431012073266446403 80.} |
|||
</pre> |
|||
Runs in 30 minutes on a HP-50g. |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |