Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Mar 30 2012 17:28:27
%S 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,
%T 23,24,24,25,25,25,26,26,26,27,27,27,28,28,28,29,28,29,30,29,29,31,30,
%U 30,31,31,31,31,31,32,33,31,31,34,33,32,33,33
%N Number of bases <= n in which n has no digits exceeding 9.
%e 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.
%o (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)
%K nonn,base
%O 1,2
%A Vladimir Shevelev and _Charles R Greathouse IV_, Jul 01 2011