Jump to content

Prime reciprocal sum: Difference between revisions

→‎{{header|ALGOL 68}}: Find the first 15
(Added Perl)
(→‎{{header|ALGOL 68}}: Find the first 15)
Line 39:
# previous primes and the sum remain below 1 #
 
PR precision 25005000 PR # set the precision of LONG LONG INT #
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 1415 DO
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>
 
3,043

edits

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