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!)
A243615 Numbers n whose digital sum equals the number of binary digits in its binary expansion. 5
1, 2, 13, 23, 33, 42, 51, 60, 70, 106, 115, 124, 134, 143, 152, 161, 170, 206, 215, 224, 233, 242, 251, 261, 270, 306, 315, 324, 333, 342, 351, 360, 405, 414, 423, 432, 441, 450, 504, 514, 523, 532, 541, 550, 604, 613, 622, 631, 640, 703, 712, 721, 730, 802, 811, 820 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
134 -> 1+3+4=8 134=10000110 -> Eight bits.
MATHEMATICA
Select[Range[10^3], Total@ IntegerDigits@ # == 1 + Floor@ Log2@ # &] (* Michael De Vlieger, Nov 05 2018 *)
Select[Range[1000], Total[IntegerDigits[#]]==IntegerLength[#, 2]&] (* Harvey P. Dale, May 30 2021 *)
PROG
(PARI) isok(n) = sumdigits(n) == #binary(n); \\ Michel Marcus, Jun 08 2014
CROSSREFS
Sequence in context: A118796 A234218 A171794 * A243617 A045389 A243621
KEYWORD
nonn,base
AUTHOR
Andreas Boe, Jun 07 2014
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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)