OFFSET
0,2
COMMENTS
What is the least n such that a(n) does not exist? Heuristics suggest around a(50000). - Charles R Greathouse IV, Dec 29 2014
The least n's such that a(n) does not exist appear to be 25337 and 89200, based on the computation of 9^k < 10^1450000. - Giovanni Resta, Jun 27 2018
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
MATHEMATICA
a = {}; Do[k = 1; While[ Count[ IntegerDigits[9^k], 3] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
Module[{nn=50, k=9^Range[500]}, Table[Position[k, _?(DigitCount[#, 10, 3]==n&), 1, 1], {n, 0, nn}]]//Flatten (* Harvey P. Dale, Jun 30 2022 *)
PROG
(PARI) a(n)=my(k, d); while(1, d=digits(9^k); if(sum(i=1, #d, d[i]==3)==n, return(k)); k++) \\ Charles R Greathouse IV, Dec 29 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
STATUS
approved