login
A254867
Numbers n such that prime(n) + n and prime(n) + n^2 are prime.
1
1, 2, 4, 22, 66, 96, 106, 144, 180, 222, 324, 378, 466, 492, 604, 742, 760, 778, 784, 960, 984, 990, 994, 1050, 1150, 1162, 1186, 1248, 1302, 1308, 1356, 1360, 1380, 1744, 1830, 1866, 1870, 1956, 2052, 2070, 2112, 2182, 2212, 2380, 2470, 2556, 2586, 2638, 2676, 2760, 2766
OFFSET
1,2
EXAMPLE
a(4) = 22 = A064402(6): prime(22) = 79, 79 + {22, 22^2} = {101, 563} both prime.
MAPLE
A254867:=n->`if`(isprime(ithprime(n)+n) and isprime(ithprime(n)+n^2), n, NULL): seq(A254867(n), n=1..10^4); # Wesley Ivan Hurt, Jan 16 2017
MATHEMATICA
Select[Range[1000], PrimeQ[Prime[#] + #] && PrimeQ[Prime[#] + #^2] &] (* Alonso del Arte, Feb 09 2015 *)
Select[Range[3000], AllTrue[Prime[#]+{#, #^2}, PrimeQ]&] (* Harvey P. Dale, Jan 17 2023 *)
CROSSREFS
Subsequence of A064402. Cf. A000040, A014688, A061067, A061068.
Sequence in context: A152120 A072355 A134246 * A305492 A220456 A071298
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 09 2015
STATUS
approved