Prime reciprocal sum: Difference between revisions
→{{header|ALGOL 68}}: Find the first 15
SqrtNegInf (talk | contribs) (Added Perl) |
(→{{header|ALGOL 68}}: Find the first 15) |
||
Line 39:
# previous primes and the sum remain below 1 #
PR precision
PR read "primes.incl.a68" PR # include prime utilities #
Line 87:
# each succeeding prime is the next prime > the denominator of the sum #
# divided by the difference of the denominator and the numerator #
FOR i FROM 2 TO
LONG LONG INT next := IF num OF sum + 1 = den OF sum
THEN den OF sum + 1
Line 129:
13: 12748246592672078196...20708715953110886963 592 digits
14: 46749025165138838243...65355869250350888941 1180 digits
15: 11390125639471674628...31060548964273180103 2358 digits
</pre>
|