Primes: n*2^m+1: Difference between revisions
→{{header|ALGOL 68}}: blurb tweak
SqrtNegInf (talk | contribs) (Added Perl) |
(→{{header|ALGOL 68}}: blurb tweak) |
||
Line 17:
=={{header|ALGOL 68}}==
{{works with|ALGOL 68G|
{{libheader|ALGOL 68-primes}}
Attempts the stretchier stretch goal - with 2000 digit precision and restricting m to at most 600, all of the first 400 primes can be found, except for 383. Increasing the number of digits and max n to 8000 should find prime 383, however I couldn't be bothered to wait long enough...<br>
The values of the primes are interesting - most will fit in 64 bits
<b>NB</b> the primes.incl.a68 source is available on a page in Rosetta Code - see the <b>library</b> above.
<syntaxhighlight lang="algol68">
BEGIN # find primes of the form 1+n*2^m where m is the lowest integer >= 0 #
|