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!)
A003607 Location of 0's when natural numbers are listed in binary.
(Formerly M2612)
5

%I M2612 #33 Feb 18 2022 10:46:49

%S 0,3,7,8,10,14,19,20,21,23,24,27,29,31,36,37,40,45,51,52,53,54,56,57,

%T 58,61,62,64,66,67,71,73,74,76,78,81,84,86,92,93,94,97,98,102,104,107,

%U 113

%N Location of 0's when natural numbers are listed in binary.

%C A030190(a(n)) = 0. [_Reinhard Zumkeller_, Dec 11 2011]

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Reinhard Zumkeller, <a href="/A003607/b003607.txt">Table of n, a(n) for n = 0..10000</a>

%t Position[IntegerDigits[Range[0, 100], 2] // Flatten, 0] - 1 // Flatten (* _Jean-François Alcover_, Oct 06 2016 *)

%o (Haskell)

%o import Data.List (elemIndices)

%o a003607 n = a003607_list !! n

%o a003607_list = elemIndices 0 a030190_list

%o -- _Reinhard Zumkeller_, Dec 11 2011

%o (Python)

%o from itertools import count, islice

%o def A003607_gen(): # generator of terms

%o return (i for i, s in enumerate(d for n in count(0) for d in bin(n)[2:]) if s == '0')

%o A003607_list = list(islice(A003607_gen(),30)) # _Chai Wah Wu_, Feb 18 2022

%Y Cf. A030303, A030306, A056062.

%K nonn

%O 0,2

%A _N. J. A. Sloane_, _Mira Bernstein_

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 10:22 EDT 2024. Contains 371967 sequences. (Running on oeis4.)