login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165265 Concatenate the number of 1's and number of 0's in the binary expansion of n. 1
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; text; internal format)
OFFSET
0,2
LINKS
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
Sequence in context: A214790 A191221 A216996 * A329818 A329447 A352339
KEYWORD
base,easy,nonn,less
AUTHOR
Gil Broussard, Sep 12 2009
EXTENSIONS
Edited by Charles R Greathouse IV, Mar 23 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)