A047846 Number of successive odd nonprimes (A014076).
1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 3, 1, 1, 1, 6, 1, 2, 4, 2, 2, 1, 2, 2, 4, 1, 5, 5, 1, 1, 2, 4, 2, 2, 2, 2, 1, 4, 6, 1, 1, 6, 2, 4, 1, 2, 3, 2, 2, 1, 2, 3, 1, 3, 4, 4, 2, 1, 2, 3, 1, 1, 5, 3, 1, 3, 1, 2, 5, 8, 2, 4, 2, 2, 2, 4, 2, 2, 2, 2, 1, 5
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a047846 n = a047846_list !! (n-1) a047846_list = 1 : zipWith (-) (tail a196277_list) a196277_list -- Reinhard Zumkeller, Sep 30 2011
-
Mathematica
Length /@ Split[Select[Range[1, 629, 2], PrimeOmega[#] != 1 &], #2 - #1 <= 2 &] (* Jayanta Basu, Aug 11 2013 *) Length/@Select[Split[Table[If[PrimeQ[n],0,1],{n,1,701,2}]],#[[1]]==1&] (* Harvey P. Dale, Oct 10 2023 *)
Extensions
a(51) and a(84) corrected by Reinhard Zumkeller, Sep 30 2011
Comments