OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(2n) = A046933(n+1). - R. J. Mathar, Jun 27 2009
a(2n+1) = 1, for n>=1. - Michel Marcus, Feb 21 2020
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
Claudio Meller, Jun 26 2009
EXTENSIONS
Name edited by Michel Marcus, Feb 21 2020
STATUS
approved