%I #17 Oct 23 2023 22:27:30
%S 5,7,10,12,19,22,28,33,45,52,59,63,81,85,92,95,115,136,138,140,144,
%T 147,171,192,198,209,211,222,224,236,249,253,256,268,270,279,288,315,
%U 318,322,325,348,355,358,373,400
%N Numbers n such that f(n) = f(n-1) - f(n-2) where f is the prime gap function given by f(m) = prime(m+1) - prime(m) and prime(m) denotes the m-th prime.
%H Harry J. Smith, <a href="/A066513/b066513.txt">Table of n, a(n) for n = 1..1000</a>
%t f[x_] := Prime[x + 1] - Prime[x]; Select[Range[3, 10^3], f[ # ] == f[ # - 1] - f[ # - 2] &]
%t Flatten[Position[Partition[Differences[Prime[Range[500]]],3,1],_?(#[[3]] == #[[2]]-#[[1]]&),1,Heads->False]]+2 (* _Harvey P. Dale_, Mar 19 2019 *)
%o (PARI) Gap(m) = { return(prime(m+1) - prime(m)); }
%o { n=0; for (m=3, 10^10, if (Gap(m) == Gap(m-1) - Gap(m-2), write("b066513.txt", n++, " ", m); if (n==1000, return)) ) } \\ _Harry J. Smith_, Feb 20 2010
%Y Cf. A001223 (f).
%K nonn
%O 1,1
%A _Joseph L. Pe_, Jan 04 2002