De Polignac numbers: Difference between revisions

m
Line 757:
 
=={{header|RPL}}==
Polignac really made a fool of himself for all time by writing to the French Academy of Science that he had verified his "theorem" up to 3,000,000. As neither 0 nor 1 are prime, the program below considers that 1 = 2^0 + 0 and 3 = 2^1 + 1 are eligible as counterexamples.
{{works with|Halcyon Calc|4.2.7}}
≪ IF DUP 5 ≤ THEN
Line 777:
'PRIM?'STO
≪ → n
≪ { 1 } 3
DO
1 CF
Line 797:
{{out}}
<pre>
1: { 1 3 127 149 251 331 337 373 509 599 701 757 809 877 905 907 959 977 997 1019 1087 1199 1207 1211 1243 1259 1271 1477 1529 1541 1549 1589 1597 1619 1649 1657 1719 1759 1777 1783 1807 1829 1859 1867 1927 1969 1973 1985 2171 2203 2213 }
</pre>
 
1,150

edits