Prime numbers p for which the sum of primes less than or equal to p is prime: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (added Arturo) |
m (Changed "collect(newSeq):" to "collect:" as "newSeq" is no longer needed.) |
||
Line 372: | Line 372: | ||
template isPrime(n: int): bool = not composite[n] |
template isPrime(n: int): bool = not composite[n] |
||
let primes = collect |
let primes = collect: |
||
for n in 2..N: |
for n in 2..N: |
||
if n.isPrime: n |
if n.isPrime: n |