login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A084291
Difference between consecutive primes arising after difference (d=2) between twin primes. In A001223, terms following those which are equal to two.
2
2, 4, 4, 4, 6, 4, 6, 6, 4, 4, 10, 6, 10, 4, 12, 4, 10, 6, 10, 4, 4, 10, 6, 4, 18, 6, 6, 12, 4, 12, 10, 4, 10, 4, 4, 10, 6, 10, 6, 4, 10, 6, 4, 6, 4, 6, 4, 6, 4, 4, 4, 6, 24, 10, 10, 12, 4, 10, 16, 22, 4, 10, 4, 10, 16, 6, 10, 4, 4, 22, 6, 6, 6, 16, 4, 4, 6, 10, 6, 16, 28, 10, 16, 12, 4, 12, 6
OFFSET
1,1
LINKS
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
Sequence in context: A035633 A160803 A278481 * A258573 A060271 A073806
KEYWORD
nonn
AUTHOR
Labos Elemer, May 26 2003
STATUS
approved