De Polignac numbers: Difference between revisions

Content added Content deleted
Line 757: Line 757:


=={{header|RPL}}==
=={{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.
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}}
{{works with|Halcyon Calc|4.2.7}}
≪ IF DUP 5 ≤ THEN
≪ IF DUP 5 ≤ THEN