login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059010 Natural numbers having an even number of nonleading zeros in their binary expansion. 8
1, 3, 4, 7, 9, 10, 12, 15, 16, 19, 21, 22, 25, 26, 28, 31, 33, 34, 36, 39, 40, 43, 45, 46, 48, 51, 53, 54, 57, 58, 60, 63, 64, 67, 69, 70, 73, 74, 76, 79, 81, 82, 84, 87, 88, 91, 93, 94, 97, 98, 100, 103, 104, 107, 109, 110, 112, 115, 117, 118, 121, 122, 124, 127, 129, 130 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Indranil Ghosh, Table of n, a(n) for n = 0..25000 (terms 0..1000 from T. D. Noe)

J.-P. Allouche, J. Shallit and G. Skordev, Self-generating sets, integers with missing blocks and substitutions, Discrete Math. 292 (2005) 1-15.

C. Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., 274 (2004), 147-160. [From N. J. A. Sloane, Jan 31 2012]

Index entries for sequences related to binary expansion of n

FORMULA

a(0) = 1, a(2n) = -a(n) + 6n + 1, a(2n+1) = a(n) + 2n + 2. a(n) = 2n+1 - 1/2(1-(-1)^A023416(n)) = 2n+1 - A059448(n). - Ralf Stephan, Sep 17 2003

MATHEMATICA

Select[Range[130], EvenQ @ DigitCount[#, 2, 0] &] (* Jean-Fran├žois Alcover, Apr 11 2011 *)

PROG

(PARI) is(n)=hammingweight(bitneg(n, #binary(n)))%2==0 \\ Charles R Greathouse IV, Mar 26 2013

(Haskell)

a059010 n = a059010_list !! (n-1)

a059010_list = filter (even . a023416) [1..]

-- Reinhard Zumkeller, Jan 21 2014

(Python)

#Program to generate the b-file

i=1

j=0

while j<=25000:

    if bin(i)[2:].count("0")%2==0:

        print str(j)+" "+str(i)

        j+=1

    i+=1 # Indranil Ghosh, Feb 03 2017

(R)

maxrow <- 4 # by choice

onezeros <- 1

for(m in 1:(maxrow+1)){

  row <- onezeros[2^(m-1):(2^m-1)]

  onezeros <- c(onezeros, c(1-row, row) )

}

a <- which(onezeros == 1)

a

# Yosu Yurramendi, Mar 28 2017

CROSSREFS

Cf. A000069, A001969, A023416, A059009 (complement), A059011, A059012, A059013, A059014, A059448.

Sequence in context: A026140 A233010 A263488 * A066928 A032726 A029739

Adjacent sequences:  A059007 A059008 A059009 * A059011 A059012 A059013

KEYWORD

nonn,easy,base,nice

AUTHOR

Patrick De Geest, Dec 15 2000

EXTENSIONS

Name clarified by Antti Karttunen, Mar 28 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified August 21 17:51 EDT 2017. Contains 290892 sequences.