%I #10 Feb 21 2020 12:30:18
%S 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,
%T 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,
%U 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
%N 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.
%H Harvey P. Dale, <a href="/A162154/b162154.txt">Table of n, a(n) for n = 1..1000</a>
%F a(2n) = A046933(n+1). - _R. J. Mathar_, Jun 27 2009
%F a(2n+1) = 1, for n>=1. - _Michel Marcus_, Feb 21 2020
%e a(1)=2 because there are two consecutive primes (2 and 3), a(2)=1 (4);
%e a(5)=1 (7), a(6)=3 because there are three consecutive composite (8,9,10).
%t Join[{2},Riffle[Last[#]-First[#]-1&/@Partition[Prime[Range[2,60]],2,1],1]] (* _Harvey P. Dale_, Jun 04 2012 *)
%Y Cf. A046933.
%K nonn
%O 1,1
%A _Claudio Meller_, Jun 26 2009
%E Name edited by _Michel Marcus_, Feb 21 2020
|