A236467 Primes p with p + 2 and prime(p) - 2 both prime.
3, 11, 29, 149, 179, 191, 269, 347, 431, 461, 617, 659, 1031, 1619, 1931, 3467, 3527, 4799, 6569, 6689, 7349, 7877, 9011, 9767, 11117, 12611, 13691, 13901, 14549, 16067, 16139, 16451, 16631, 17489, 17681, 18911, 20981, 22367, 23909, 24179
Offset: 1
Keywords
Examples
a(1) = 3 since 3, 3 + 2 = 5 and prime(3) - 2 = 3 are all prime, but 2 + 2 = 4 is composite.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
p[n_]:=p[n]=PrimeQ[n+2]&&PrimeQ[Prime[n]-2] n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}] Select[Prime[Range[3000]],AllTrue[{#+2,Prime[#]-2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 11 2020 *)
Comments