%I #17 Jan 04 2016 01:37:01
%S 13,20,60,93,113,116,141,212,234,254,262,269,277,286,292,295,302,323,
%T 353,359,370,390,408,418,474,501,543,599,613,625,715,719,724,743,820,
%U 934,940,995,999,1017,1099,1120,1264,1300,1313,1401,1415,1419,1423
%N Numbers n such that prime(n+1) + prime(n-2) = 2*prime(n-1), where prime(m) is the m-th prime.
%C 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).
%H Harry J. Smith, <a href="/A066515/b066515.txt">Table of n, a(n) for n = 1..1000</a>
%t Select[ Range[ 3, 1440 ], Prime[ #+1 ]+Prime[ #-2 ]==2Prime[ #-1 ]& ]
%t PrimePi[#[[3]]]&/@Select[Partition[Prime[Range[1500]],4,1], First[#]+ Last[#]==2#[[2]]&] (* _Harvey P. Dale_, Apr 13 2012 *)
%o (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
%o (PARI) isok(n) = prime(n+1) + prime(n-2) == 2*prime(n-1); \\ _Michel Marcus_, Jan 04 2016
%K nonn
%O 1,1
%A _Joseph L. Pe_, Jan 04 2002
%E Edited by _Dean Hickerson_, Jan 10 2002