Prime numbers p for which the sum of primes less than or equal to p is prime: Difference between revisions
Prime numbers p for which the sum of primes less than or equal to p is prime (view source)
Revision as of 15:42, 28 January 2024
, 3 months ago→{{header|Wren}}: Minor tidy
(→J: simplify) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 783:
=={{header|Wren}}==
{{libheader|Wren-math}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="
import "./
var primes = Int.primeSieve(1000, true)
Line 799 ⟶ 797:
}
System.print("Primes 'p' under 1000 where the sum of all primes <= p is also prime:")
Fmt.tprint("$4d", results, 7)
System.print("\nFound %(results.count) such primes.")</syntaxhighlight>
|