login
Smallest k such that 3^k has exactly n 4's in its decimal representation.
0

%I #5 Jun 26 2018 19:22:31

%S 1,5,12,20,59,58,86,63,72,139,125,159,136,211,204,170,196,197,271,302,

%T 218,308,344,392,309,351,434,488,490,414,529,452,484,523,538,526,594,

%U 522,605,592,705,670,649,672,771,785,691,819,788,887,808

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

%t a = {}; Do[k = 1; While[ Count[ IntegerDigits[3^k], 4] != 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