OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
Do[s1=Prime[n]-Prime[n-1]; s=Prime[n+1]-Prime[n]; s2=Prime[n+2]-Prime[n+1]; If[Equal[s, 2], Print[s2]], {n, 1, 10000}]
#[[3]]-#[[2]]&/@Select[Partition[Prime[Range[1000]], 3, 1], #[[2]]- #[[1]] == 2&] (* Harvey P. Dale, Jul 08 2018 *)
Join[{2}, SequenceCases[Differences[Prime[Range[3, 500]]], {2, _}][[;; , 2]]] (* Harvey P. Dale, Mar 20 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 26 2003
STATUS
approved