A232897 Number of nonnegative integers not exceeding n which have no decimal digits occurring in n.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 16, 8, 18, 16, 16, 16, 16, 16, 16, 16, 24, 16, 16, 27, 24, 24, 24, 24, 24, 24, 32, 24, 24, 24, 36, 32, 32, 32, 32, 32, 40, 32, 32, 32, 32, 45, 40, 40, 40, 40, 48, 40, 40, 40, 40, 40, 54, 48, 48, 48, 56
Offset: 0
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Programs
-
PARI
a(n)=if(n<9,return(n)); my(d=Set(digits(n))); sum(k=1,n-1, #setintersect(d, Set(digits(k)))==0)+(d[1]>0) \\ Charles R Greathouse IV, Dec 02 2013
Extensions
More terms from Peter J. C. Moses, Dec 02 2013
Comments