login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest k such that 9^k has exactly n 1's in its decimal representation.
0

%I #6 Jun 26 2018 19:06:21

%S 1,2,6,17,16,21,51,46,42,50,65,60,81,64,101,89,107,179,130,158,167,

%T 194,191,164,149,197,192,202,257,227,245,244,253,304,264,296,306,321,

%U 292,302,295,314,335,346,334,450,388,406,359,394,428

%N Smallest k such that 9^k has exactly n 1's in its decimal representation.

%t a = {}; Do[k = 1; While[ Count[ IntegerDigits[9^k], 1] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a

%K base,nonn

%O 0,2

%A _Robert G. Wilson v_, Aug 10 2001

%E Name corrected by _Jon E. Schoenfield_, Jun 26 2018