|
|
A162154
|
|
Odd-indexed terms are the number of consecutive prime numbers until a composite, even-indexed terms are the number of consecutive composite numbers until a prime.
|
|
2
|
|
|
2, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 5, 1, 1, 1, 5, 1, 3, 1, 1, 1, 3, 1, 5, 1, 5, 1, 1, 1, 5, 1, 3, 1, 1, 1, 5, 1, 3, 1, 5, 1, 7, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 13, 1, 3, 1, 5, 1, 1, 1, 9, 1, 1, 1, 5, 1, 5, 1, 3, 1, 5, 1, 5, 1, 1, 1, 9, 1, 1, 1, 3, 1, 1, 1, 11, 1, 11, 1, 3, 1, 1, 1, 3, 1, 5, 1, 1, 1, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(1)=2 because there are two consecutive primes (2 and 3), a(2)=1 (4);
a(5)=1 (7), a(6)=3 because there are three consecutive composite (8,9,10).
|
|
MATHEMATICA
|
Join[{2}, Riffle[Last[#]-First[#]-1&/@Partition[Prime[Range[2, 60]], 2, 1], 1]] (* Harvey P. Dale, Jun 04 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|