A143794 Primes p, with index k, such that p-k and p+k are both prime.
7, 13, 61, 181, 317, 827, 1831, 2657, 2801, 3181, 3739, 4093, 4561, 5011, 5443, 5531, 5653, 6359, 6659, 9029, 10729, 11383, 13109, 13907, 14489, 15217, 15859, 16603, 17581, 20393, 21499, 23537, 25037, 25169, 26153, 26959, 27077, 27803, 27851
Offset: 1
Keywords
Examples
7 = prime(4) and both 7 - 4 = 3 and 7 + 4 = 11 are prime; 13 = prime(6) and both 13 - 6 = 7 and 13 + 6 = 19 are prime; 61 = prime(18) and both 61 - 18 = 43 and 61 + 18 = 79 are prime.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A064403 (corresponding prime indices).
Programs
-
Mathematica
lst={};Do[p=Prime[n];If[PrimeQ[p-n]&&PrimeQ[p+n],AppendTo[lst,p]],{n,8!}];lst Transpose[Select[Table[{n,Prime[n]},{n,3100}],And@@PrimeQ[{Last[#]- First[#],Total[#]}]&]][[2]] (* Harvey P. Dale, Nov 04 2011 *)
-
PARI
n=0;forprime(p=2,1e5,if(isprime(p-n++)&&isprime(p+n),print1(p", "))) \\ Charles R Greathouse IV, Nov 04 2011
Extensions
Definition edited by Harvey P. Dale, Nov 04 2011