Jump to content

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. To make the search faster, RPL flag management features (CF, SF, FC? instructions) are used to exit loops when the remainder of (n - 2^k) is not prime.
{{works with|Halcyon Calc|4.2.7}}
≪ IF DUP 5 ≤ THEN
1,150

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.