CalmoSoft primes: Difference between revisions
Undo revision 340330 by Wherrera (talk)
m (→Stretch task) |
Tag: Undo |
||
Line 992:
def calmo_prime_sequence(
""" find the largest prime seq in primes <
pri = list(primerange(
for
f'Longest Calmo
print('[', ', '.join(map(str, pri[i:i+6])), ', ... ', ', '.join(map(str, pri[i+window_size-6:i+window_size])), ']\n', sep='')
▲ ') of primes less than', maxp, 'totals', sum(pri[d+1:d+w+1]))
else:
print(
return
▲ calmo_prime_sequence(pmax)
</syntaxhighlight>{{out}}
<pre>
Longest Calmo prime seq (length 21
The sequence is: [7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89]
▲Longest Calmo prime seq (length 3001117 ) of primes less than 50000000 totals 72618848632313
▲[7, 11, 13, 17, 1 , ... 49999699, 49999711, 49999739, 49999751, 49999753]
</pre>
|