login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A123993
Primes p such that p^2 is an interprime = average of two successive primes.
1
2, 3, 41, 907, 1151, 1553, 1609, 1667, 1801, 1907, 1933, 2351, 2473, 2531, 2953, 3001, 3571, 4007, 4073, 4253, 4663, 5023, 5417, 5881, 6143, 6257, 6329, 6343, 7879, 8461, 8521, 8563, 9041, 9067, 10103, 10781, 11243, 11251, 11257, 12097, 12413, 13217
OFFSET
1,1
COMMENTS
Primes in A075190 (numbers n such that n^2 is an interprime).
MATHEMATICA
Select[PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Select[ Range[25000], 2#^2 == PrevPrim[ #^2] + NextPrim[ #^2] &], PrimeQ]
atsp[n_]:=Module[{n2=n^2}, (NextPrime[n2]+NextPrime[n2, -1])/2==n2]; Select[Prime[Range[2000]], atsp] (* Harvey P. Dale, Jan 05 2011 *)
PROG
(PARI) isok(p) = isprime(p) && ((nextprime(p^2) + precprime(p^2)) / 2 - p^2 == 0); \\ Michel Marcus, Dec 11 2020
CROSSREFS
Cf. A075190, A024675 (interprimes).
Sequence in context: A200817 A042475 A241277 * A351820 A271331 A101821
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 30 2006
STATUS
approved