login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A243621
Numbers whose digital sum equals the number of bits in its binary expansion. Repeated digits in decimal expansion are not allowed.
1
1, 2, 13, 23, 42, 51, 60, 70, 106, 124, 134, 143, 152, 170, 206, 215, 251, 261, 270, 306, 315, 324, 342, 351, 360, 405, 423, 432, 450, 504, 514, 523, 532, 541, 604, 613, 631, 640, 703, 712, 721, 730, 802, 820, 901, 910, 1028, 1037, 1046, 1064, 1073, 1082, 1208
OFFSET
1,2
COMMENTS
Subset of A243615.
EXAMPLE
51 -> 5+1=6 51=110011 -> Six bits.
MATHEMATICA
Select[Range[750], Total[IntegerDigits[#]]==IntegerLength[#, 2]&&Max[ DigitCount[ #]]==1&] (* Harvey P. Dale, Mar 22 2015 *)
PROG
(PARI) isok(n) = (sumdigits(n) == #binary(n)) && (v=digits(n)) && (#v == #vecsort(v, , 8)); \\ Michel Marcus, Jun 08 2014
CROSSREFS
Cf. A243615 (same principle but allows repetition of figures).
Sequence in context: A243615 A243617 A045389 * A195190 A215390 A285789
KEYWORD
nonn,base
AUTHOR
Andreas Boe, Jun 07 2014
STATUS
approved