|
|
A003607
|
|
Location of 0's when natural numbers are listed in binary.
(Formerly M2612)
|
|
5
|
|
|
0, 3, 7, 8, 10, 14, 19, 20, 21, 23, 24, 27, 29, 31, 36, 37, 40, 45, 51, 52, 53, 54, 56, 57, 58, 61, 62, 64, 66, 67, 71, 73, 74, 76, 78, 81, 84, 86, 92, 93, 94, 97, 98, 102, 104, 107, 113
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
MATHEMATICA
|
Position[IntegerDigits[Range[0, 100], 2] // Flatten, 0] - 1 // Flatten (* Jean-François Alcover, Oct 06 2016 *)
|
|
PROG
|
(Haskell)
import Data.List (elemIndices)
a003607 n = a003607_list !! n
a003607_list = elemIndices 0 a030190_list
(Python)
from itertools import count, islice
def A003607_gen(): # generator of terms
return (i for i, s in enumerate(d for n in count(0) for d in bin(n)[2:]) if s == '0')
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|