login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047846 Number of successive odd nonprimes (A014076). 6

%I #20 Oct 10 2023 16:24:10

%S 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,

%T 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,

%U 1,3,1,2,5,8,2,4,2,2,2,4,2,2,2,2,1,5

%N Number of successive odd nonprimes (A014076).

%C Beginning with a(2), length of n-th run of identical numbers in A160522 [_Kyle Stern_, Jun 19 2009]

%C a(n+1) = A196277(n+1) - A196277(n). [_Reinhard Zumkeller_, Sep 30 2011]

%H Reinhard Zumkeller, <a href="/A047846/b047846.txt">Table of n, a(n) for n = 1..10000</a>

%t Length /@ Split[Select[Range[1, 629, 2], PrimeOmega[#] != 1 &], #2 - #1 <= 2 &] (* _Jayanta Basu_, Aug 11 2013 *)

%t Length/@Select[Split[Table[If[PrimeQ[n],0,1],{n,1,701,2}]],#[[1]]==1&] (* _Harvey P. Dale_, Oct 10 2023 *)

%o (Haskell)

%o a047846 n = a047846_list !! (n-1)

%o a047846_list = 1 : zipWith (-) (tail a196277_list) a196277_list

%o -- _Reinhard Zumkeller_, Sep 30 2011

%Y Length of n-th run in A014076.

%Y Cf. A160522.

%K easy,nonn

%O 1,5

%A _Enoch Haga_

%E a(51) and a(84) corrected by _Reinhard Zumkeller_, Sep 30 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)