|
|
A037201
|
|
Differences between consecutive primes (A001223) but with repeats omitted.
|
|
26
|
|
|
1, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 4, 6, 2, 10, 2, 4, 2, 12, 4, 2, 4, 6, 2, 10, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
Flatten[Split[Differences[Prime[Range[150]]]]/.{{a_, b_}->a, {a_, b_, c_}->a}] (* Harvey P. Dale, Jun 21 2012 *)
|
|
PROG
|
(Haskell)
a037201 n = a037201_list !! (n-1)
a037201_list = f a001223_list where
f (x:xs@(x':_)) | x == x' = f xs
| otherwise = x : f xs
(PARI) t=0; p=2; forprime(q=3, 1e3, if(q-p!=t, print1(q-p", ")); t=q-p; p=q) \\ Charles R Greathouse IV, Feb 27 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|