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 6's in its decimal representation.
0

%I #8 Jun 11 2024 16:42:37

%S 1,7,4,20,26,24,39,17,59,65,72,97,69,121,141,104,125,136,132,147,144,

%T 163,179,161,177,184,208,191,257,193,262,281,294,267,318,334,297,347,

%U 319,310,369,315,365,349,399,387,383,414,373,408,434

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

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

%t Join[{1},With[{k6=DigitCount[9^Range[0,500],10,6]},Flatten[Table[Position[k6,n,1,1],{n,50}]]]-1] (* _Harvey P. Dale_, Jun 11 2024 *)

%K base,nonn

%O 0,2

%A _Robert G. Wilson v_, Aug 10 2001

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