OFFSET
1,2
EXAMPLE
30 is 1E, 1D, 1C, 1B, 1A in bases 16 through 20, while in other bases it uses only decimal digits. Thus a(30) = 30 - 5 = 25.
PROG
(PARI) a(n)=my(m, k); 1+sum(b=2, n, k=n; m=1; while(k, if(k%b>9, m=0; break); k\=b); m)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev and Charles R Greathouse IV, Jul 01 2011
STATUS
approved