Find prime numbers of the form n*n*n 2

1..^200 -> map { _**3 + 2 }.grep {.is_prime}.say

Output:

[3, 29, 127, 24391, 91127, 250049, 274627, 328511, 357913, 571789, 1157627, 1442899, 1860869, 2146691, 2924209, 3581579, 5000213, 5177719, 6751271]

Last updated