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

%I #8 Jun 26 2018 19:06:50

%S 2,1,14,11,26,29,49,33,67,81,84,96,101,95,89,132,163,160,137,152,185,

%T 177,195,230,205,188,214,267,274,288,325,307,286,285,270,311,324,353,

%U 318,336,309,329,403,375,432,436,447,479,401,459,491

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

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

%t Module[{p7=DigitCount[#,10,7]&/@(7^Range[500])},Table[Position[p7,n,{1},1],{n,0,50}]]//Flatten (* _Harvey P. Dale_, Apr 08 2017 *)

%K base,nonn

%O 0,1

%A _Robert G. Wilson v_, Aug 10 2001

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