login
A192438
Number of bases <= n in which n has no digits exceeding 9.
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 28, 29, 30, 29, 29, 31, 30, 30, 31, 31, 31, 31, 31, 32, 33, 31, 31, 34, 33, 32, 33, 33
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
Sequence in context: A323366 A030066 A355479 * A081331 A369261 A369260
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev and Charles R Greathouse IV, Jul 01 2011
STATUS
approved