A259488 Positive integers k with prime(k)+2 and prime(prime(k))+2 both prime.
2, 3, 7, 13, 296, 343, 395, 405, 408, 463, 469, 473, 542, 572, 577, 584, 625, 671, 673, 695, 837, 984, 1016, 1030, 1074, 1165, 1224, 1230, 1328, 1410, 1445, 1679, 1825, 1860, 1867, 1949, 2078, 2091, 2095, 2123, 2167, 2476, 2478, 2616, 2753, 2764, 2956, 3011, 3065, 3416, 3621, 3646, 3712, 3720, 3758, 3872, 3926, 4063, 4071, 4079, 4133, 4217, 4312, 4351, 4524, 4745, 4855, 4865, 4882, 4922
Offset: 1
Keywords
Examples
a(1) = 2 since prime(2)+2 = 5 and prime(prime(2))+2 = prime(3)+2 = 7 are both prime, but prime(1)+2 = 4 is composite. a(2) = 3 since prime(3)+2 = 7 and prime(prime(3))+2 = prime(7)+2 = 19 are both prime.
References
- Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641 [math.NT], 2014.
Programs
-
Mathematica
n=0;Do[If[PrimeQ[Prime[k]+2]&&PrimeQ[Prime[Prime[k]]+2],n=n+1;Print[n," ",k]],{k,1,5000}] Select[Range[5000],AllTrue[{Prime[#]+2,Prime[Prime[#]]+2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 18 2018 *)
-
PARI
k=pk=0; forprime(ppk=2,1e6, if(isprime(pk++),k++; if(isprime(pk+2) && isprime(ppk+2), print1(k", ")))) \\ Charles R Greathouse IV, Jun 29 2015
Comments