Find prime numbers of the form n*n*n+2: Difference between revisions

Content added Content deleted
m (→‎{{header|Julia}}: add brief version)
Line 231: Line 231:
The total found was 19.
The total found was 19.
</pre>
</pre>
=== One-liner version ===

<lang julia>using Primes; println(filter(isprime, map(x -> x^3 + 2, 1:199)))</lang>{{out}}<pre>
[3, 29, 127, 24391, 91127, 250049, 274627, 328511, 357913, 571789, 1157627, 1442899, 1860869, 2146691, 2924209, 3581579, 5000213, 5177719, 6751271]</pre>


=={{header|Phix}}==
=={{header|Phix}}==