Sum of primes in odd positions is prime: Difference between revisions
Sum of primes in odd positions is prime (view source)
Revision as of 22:24, 11 September 2021
, 2 years ago→{{header|Nim}}
(→{{header|ALGOL 68}}: Use the new prime list routines in Algol 68-primes) |
|||
Line 165:
(823, 26879)
</pre>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>p = Prime[Range[1, PrimePi[1000], 2]];
p = {p, Accumulate[p]} // Transpose;
Select[p, Last /* PrimeQ]</lang>
{{out}}
<pre>{{2,2},{5,7},{31,89},{103,659},{149,1181},{331,5021},{467,9923},{499,10909},{523,11941},{653,17959},{823,26879}}</pre>
=={{header|Nim}}==
|