|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|