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”).

A138264
Balanced prime numbers n such that n*(n-1)+1 is a balanced prime.
1
150571, 998353, 1719517, 3942889, 4476187, 5290699, 5651869, 6041701, 6089521, 6553117, 8018089, 9046627, 9606349, 10990489, 11460859, 11466769, 12573283, 12997483, 13082617, 13152817, 13334701, 14774971, 16240597, 16319179, 17335501, 17445397, 18814261
OFFSET
1,1
MATHEMATICA
NextPrime[n_Int]:=Module[{k}, k=n+1; While[ !PrimeQ[k], k++ ]; k]; PrevPrime[n_Int]:=Module[{k}, k=n-1; While[ !PrimeQ[k], k-- ]; k]; s=""; For[i=2, i< 10^5*5, p=Prime[i]; If[(Prime[i-1]+Prime[i+1])/2==p, r=p*(p-1)+1; a=PrevPrime[r]; b=NextPrime[r]; If[PrimeQ[r]&&r==(a+b)/2, (*Print[p, ":", a, ", ", b, "; ", r]*)s=s<>ToString[p]<>", "]]; i++ ]; Print[s]
bpnQ[{a_, b_, c_}]:=Module[{d=b(b-1)+1, e, f}, e=NextPrime[d, -1]; f= NextPrime[ d]; (a+c)/2==b&&PrimeQ[d]&&(e+f)/2==d]; Select[Partition[Prime[ Range[ 1200000]], 3, 1], bpnQ][[All, 2]] (* Harvey P. Dale, May 12 2017 *)
CROSSREFS
Cf. A006562.
Sequence in context: A051651 A065324 A262195 * A343679 A246285 A344940
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(11)-a(27) from Donovan Johnson, Aug 24 2011
STATUS
approved