Prime numbers p for which the sum of primes less than or equal to p is prime: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
(added Arturo)
Line 84: Line 84:
Found 21 prime sums of primes below 1000
Found 21 prime sums of primes below 1000
</pre>
</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}}==
=={{header|AWK}}==
<syntaxhighlight lang="awk">
<syntaxhighlight lang="awk">