A385663 Binary numbers with an even number of 1s.
0, 11, 101, 110, 1001, 1010, 1100, 1111, 10001, 10010, 10100, 10111, 11000, 11011, 11101, 11110, 100001, 100010, 100100, 100111, 101000, 101011, 101101, 101110, 110000, 110011, 110101, 110110, 111001, 111010, 111100, 111111, 1000001, 1000010, 1000100, 1000111
Offset: 1
Links
- David Consiglio, Jr., Table of n, a(n) for n = 1..10001
Programs
-
Python
def a(n): return int(bin(((n-1)<<1)|((n-1).bit_count()&1))[2:]) print([a(n) for n in range(1, 37)]) # Michael S. Branicky, Jul 23 2025
Formula
Extensions
More terms from David Consiglio, Jr., Jul 23 2025
Offset changed to 1 by Michael S. Branicky, Jul 23 2025
Comments