A132680 Number of ones in binary representation of odious numbers.
1, 1, 1, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 5, 1, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 5, 5, 5, 1, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 7, 1, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 7, 3, 3, 3, 5, 3, 5, 5, 5, 3
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10001
- Eric Weisstein's World of Mathematics, Odious Number.
- Eric Weisstein's World of Mathematics, Thue-Morse Sequence.
- Index entries for sequences related to binary expansion of n.
Programs
-
Mathematica
Select[DigitCount[Range[200], 2, 1], OddQ] (* Amiram Eldar, Jul 22 2023 *)
-
PARI
a(n)=hammingweight(2*n-1-hammingweight(n-1)%2) \\ Charles R Greathouse IV, Mar 26 2013