OFFSET
1,1
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..32768
EXAMPLE
36 is in the sequence because 36 = 100100_10. '100100' has two 1's and four 0's. - Indranil Ghosh, Feb 10 2017
MATHEMATICA
Select[Range[200], AllTrue[{DigitCount[#, 2, 0], DigitCount[#, 2, 1]}, EvenQ]&] (* Harvey P. Dale, Aug 16 2021 *)
PROG
(PARI) is(n)=hammingweight(n)%2==0 && hammingweight(bitneg(n, #binary(n)))%2==0 \\ Charles R Greathouse IV, Mar 26 2013
(Python)
i=0
j=1
while j<=300:
if bin(i)[2:].count("1")%2 == 0 == bin(i)[2:].count("0")%2:
print(str(j)+" "+str(i))
j+=1
i+=1 # Indranil Ghosh, Feb 10 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Dec 15 2000
STATUS
approved