1..1000.isqrt -> map { _**2 }.grep { is_prime(_+1) }.say
[1, 4, 16, 36, 100, 196, 256, 400, 576, 676]
Last updated 2 years ago