login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123993 Primes p such that p^2 is an interprime = average of two successive primes. 1

%I #12 Dec 11 2020 11:30:49

%S 2,3,41,907,1151,1553,1609,1667,1801,1907,1933,2351,2473,2531,2953,

%T 3001,3571,4007,4073,4253,4663,5023,5417,5881,6143,6257,6329,6343,

%U 7879,8461,8521,8563,9041,9067,10103,10781,11243,11251,11257,12097,12413,13217

%N Primes p such that p^2 is an interprime = average of two successive primes.

%C Primes in A075190 (numbers n such that n^2 is an interprime).

%t 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]

%t atsp[n_]:=Module[{n2=n^2},(NextPrime[n2]+NextPrime[n2,-1])/2==n2]; Select[Prime[Range[2000]],atsp] (* _Harvey P. Dale_, Jan 05 2011 *)

%o (PARI) isok(p) = isprime(p) && ((nextprime(p^2) + precprime(p^2)) / 2 - p^2 == 0); \\ _Michel Marcus_, Dec 11 2020

%Y Cf. A075190, A024675 (interprimes).

%K nonn

%O 1,1

%A _Alexander Adamchuk_, Oct 30 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 4 09:09 EDT 2024. Contains 375681 sequences. (Running on oeis4.)