|
| |
|
|
A165265
|
|
Concatenate the number of 1s and number of 0s in the binary expansion of n.
|
|
0
| |
|
|
1, 10, 11, 20, 12, 21, 21, 30, 13, 22, 22, 31, 22, 31, 31, 40, 14, 23, 23, 32, 23, 32, 32, 41, 23, 32, 32, 41, 32, 41, 41, 50, 15, 24, 24, 33, 24, 33, 33, 42, 24, 33, 33, 42, 33, 42, 42, 51, 24, 33, 33, 42, 33, 42, 42, 51, 33, 42, 42, 51, 42, 51, 51, 60, 16, 25, 25, 34, 25, 34
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,2
|
|
|
EXAMPLE
| a(7) = 30 because "111" has 3 zeros and 0 ones. a(8) = 13 because "1000" has 1 zero and 3 ones.
|
|
|
MATHEMATICA
| f[n_]:=Module[{idn2=IntegerDigits[n, 2]}, FromDigits[Join[{Count[idn2, 1], Count[idn2, 0]}]]]
f/@Range[0, 80] (* From Harvey P. Dale, Feb 14 2011 *)
|
|
|
CROSSREFS
| Sequence in context: A112787 A037307 A191221 * A197652 A049345 A007623
Adjacent sequences: A165262 A165263 A165264 * A165266 A165267 A165268
|
|
|
KEYWORD
| base,easy,nonn,less
|
|
|
AUTHOR
| Gil Broussard (gilbroussard(AT)bellsouth.net), Sep 12 2009
|
|
|
EXTENSIONS
| Edited by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Mar 23 2010
|
| |
|
|