login
A138267
Balanced prime numbers n such that n*(n+1)+1 is a balanced prime.
0
173, 68099, 76487, 96377, 336593, 488909, 1388381, 2625929, 2757767, 3189287, 3296021, 4057847, 4817399, 5223293, 5803769, 6495509, 6538997, 6569993, 6574769, 6914717, 8928389, 9021323, 9722789, 11439053, 11589467, 12471317, 15061973
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*2, 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: A209809 A185707 A185701 * A096709 A180417 A351375
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(9)-a(27) from Donovan Johnson, Mar 26 2011
STATUS
approved