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 11:31, 9 March 2023
, 1 year agoadded Arturo
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Drkameleon (talk | contribs) (added Arturo) |
||
Line 84:
Found 21 prime sums of primes below 1000
</pre>
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">primes: select 1..1000 => prime?
pprimes: select primes 'x ->
prime? sum select primes 'y -> y =< x
loop split.every:7 pprimes 'x ->
print map x 's -> pad to :string s 4</syntaxhighlight>
{{out}}
<pre> 2 3 7 13 37 43 281
311 503 541 557 593 619 673
683 733 743 839 881 929 953</pre>
=={{header|AWK}}==
<syntaxhighlight lang="awk">
|