OFFSET
0,3
COMMENTS
a(10^j) = ceiling((10^j) / j) for any j > 0.
a(i*10^j) <= ceiling((i*10^j) / j) for any i > 0 and j > 0.
LINKS
Paul Tek, Table of n, a(n) for n = 0..1000
EXAMPLE
3^11 = 177147 is the first power of 3 with some digit occurring 3 times in its decimal representation. Hence a(3)=11.
MATHEMATICA
a[n_] := If[n < 2, 0, Block[{k = 1}, While[Max[DigitCount[n^k]] < n, k++]; k]]; Array[a, 62, 0] (* Giovanni Resta, May 17 2013 *)
PROG
(PARI) mddo(n)=my(c=vector(10), m=0, d); while(n>0, d=n%10; n=n\10; c[d+1]=1+c[d+1]; m=max(c[d+1], m)); return(m)
a(n)=my(k=0, p=1); while(mddo(p)<n, k=k+1; p=p*n); return(k)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul Tek, May 16 2013
STATUS
approved