login
Odd number of 0's and 1's in binary expansion.
3

%I #12 Oct 26 2019 17:55:47

%S 2,8,11,13,14,32,35,37,38,41,42,44,47,49,50,52,55,56,59,61,62,128,131,

%T 133,134,137,138,140,143,145,146,148,151,152,155,157,158,161,162,164,

%U 167,168,171,173,174,176,179,181,182,185,186,188,191,193,194,196,199

%N Odd number of 0's and 1's in binary expansion.

%H Harvey P. Dale, <a href="/A059011/b059011.txt">Table of n, a(n) for n = 1..10000</a>

%F A071295(a(n)) is odd. - _Reinhard Zumkeller_, Aug 09 2014

%t Select[Range[200],EvenQ[IntegerLength[#,2]]&&OddQ[DigitCount[#,2,1]]&] (* _Harvey P. Dale_, Oct 16 2012 *)

%o (PARI) is(n)=hammingweight(n)%2 && hammingweight(bitneg(n, #binary(n)))%2 \\ _Charles R Greathouse IV_, Mar 26 2013

%o (Haskell)

%o a059011 n = a059011_list !! (n-1)

%o a059011_list = filter (odd . a071295) [0..]

%o -- _Reinhard Zumkeller_, Aug 09 2014

%Y Cf. A000069, A001969, A059009-A059014.

%Y Cf. A000120, A023416, A071295.

%K nonn,easy

%O 1,1

%A _Patrick De Geest_, Dec 15 2000