[go: up one dir, main page]

login
A143794
Primes p, with index k, such that p-k and p+k are both prime.
4
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,1
LINKS
EXAMPLE
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.
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 *)
PROG
(PARI) n=0; forprime(p=2, 1e5, if(isprime(p-n++)&&isprime(p+n), print1(p", "))) \\ Charles R Greathouse IV, Nov 04 2011
CROSSREFS
Cf. A064403 (corresponding prime indices).
Sequence in context: A253210 A183180 A133664 * A334794 A325029 A159198
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition edited by Harvey P. Dale, Nov 04 2011
STATUS
approved