login
A063617
Smallest k such that 8^k has exactly n 1's in its decimal representation.
0
1, 3, 8, 14, 19, 28, 39, 38, 51, 76, 69, 65, 95, 56, 107, 115, 130, 124, 180, 171, 168, 160, 186, 193, 199, 169, 207, 216, 200, 223, 192, 282, 285, 240, 278, 322, 298, 317, 331, 309, 315, 343, 311, 416, 378, 430, 403, 402, 454, 441, 376
OFFSET
0,2
MATHEMATICA
a = {}; Do[k = 1; While[ Count[ IntegerDigits[8^k], 1] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
Join[{1, 3}, Module[{nn=500, p8}, p8=Table[{n, 8^n}, {n, 0, nn}]; Table[SelectFirst[ p8, DigitCount[#[[2]], 10, 1]==x&], {x, 2, 50}]][[All, 1]]] (* Harvey P. Dale, Sep 06 2022 *)
CROSSREFS
Sequence in context: A184517 A028252 A299647 * A062550 A219930 A333962
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name corrected by Jon E. Schoenfield, Jun 26 2018
STATUS
approved