Wagstaff primes: Difference between revisions

Content added Content deleted
(python)
Line 95: Line 95:
if isprime(wag):
if isprime(wag):
wcount += 1
wcount += 1
print(f'{wcount: 2}: {pri: 5} => ',
print(f'{wcount: 3}: {pri: 5} => ',
f'{wag:,}' if wcount < 11 else f'[{len(str(wag))} digit number]')
f'{wag:,}' if wcount < 11 else f'[{len(str(wag))} digit number]')


Line 102: Line 102:
</syntaxhighlight>{{out}}
</syntaxhighlight>{{out}}
<pre>
<pre>
1: 3 => 3
1: 3 => 3
2: 5 => 11
2: 5 => 11
3: 7 => 43
3: 7 => 43
4: 11 => 683
4: 11 => 683
5: 13 => 2,731
5: 13 => 2,731
6: 17 => 43,691
6: 17 => 43,691
7: 19 => 174,763
7: 19 => 174,763
8: 23 => 2,796,203
8: 23 => 2,796,203
9: 31 => 715,827,883
9: 31 => 715,827,883
10: 43 => 2,932,031,007,403
10: 43 => 2,932,031,007,403
11: 61 => [18 digit number]
11: 61 => [18 digit number]