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

A138254
Balanced prime numbers n such that n*(n-1)-1 is a balanced prime.
0
10657, 15161, 422911, 691709, 735877, 816239, 1025267, 1030511, 1471891, 1618937, 1683497, 2125411, 2322367, 2448961, 2776157, 2856461, 2880949, 3027319, 3091409, 3114509, 3183337, 3642479, 3797539, 3858091, 3894181, 4752031, 5383387, 5832467, 6052927, 6077821
OFFSET
1,1
EXAMPLE
10657 is balanced prime, 10657*10656-1=113560991 is balanced prime
(113560973(prev)+113561009(next))/2=113560991
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, 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]
CROSSREFS
Cf. A006562.
Sequence in context: A013904 A317417 A317418 * A154510 A157326 A207261
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(9)-a(30) from Donovan Johnson, Aug 24 2011
STATUS
approved