OFFSET
1,1
COMMENTS
Equivalently, n such that f(n) = f(n-2) - f(n-1) where f is the prime gap function given by f(m) = p(m+1) - p(m).
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
MATHEMATICA
Select[ Range[ 3, 1440 ], Prime[ #+1 ]+Prime[ #-2 ]==2Prime[ #-1 ]& ]
PrimePi[#[[3]]]&/@Select[Partition[Prime[Range[1500]], 4, 1], First[#]+ Last[#]==2#[[2]]&] (* Harvey P. Dale, Apr 13 2012 *)
PROG
(PARI) { n=0; for (m=3, 10^10, if (prime(m+1) + prime(m-2) == 2*prime(m-1), write("b066515.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Feb 20 2010
(PARI) isok(n) = prime(n+1) + prime(n-2) == 2*prime(n-1); \\ Michel Marcus, Jan 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 04 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 10 2002
STATUS
approved