OFFSET
0,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..4096
EXAMPLE
a(7) = 30 because "111" has three 0's and zero 1's.
a(8) = 13 because "1000" has one 1 and three 0's.
From Michael De Vlieger, Sep 23 2017: (Start)
a(1023) = 100 because "1111111111" has no 0's and ten 1's.
a(2048) = 111 because "100000000000" has eleven 0's and one 1. (End)
MATHEMATICA
f[n_]:=Module[{idn2=IntegerDigits[n, 2]}, FromDigits[Join[{Count[idn2, 1], Count[idn2, 0]}]]]
f/@Range[0, 80] (* Harvey P. Dale, Feb 14 2011 *)
Table[FromDigits@ Flatten@ Map[IntegerDigits, DigitCount[n, 2]], {n, 0, 73}] (* Michael De Vlieger, Sep 23 2017 *)
CROSSREFS
KEYWORD
base,easy,nonn,less
AUTHOR
Gil Broussard, Sep 12 2009
EXTENSIONS
Edited by Charles R Greathouse IV, Mar 23 2010
STATUS
approved