OFFSET
1,1
EXAMPLE
808 has more 8's than any other digit, whereas 8008 has as many 0's as 8's.
MATHEMATICA
Select[Range[0, 2000], Max@ #1 < First@ #2 & @@ TakeDrop[RotateLeft[#, 8] &@ DigitCount@ #, 9] &] (* Michael De Vlieger, Sep 18 2017 *)
PROG
(PARI) isok(n) = {d = digits(n); v = vector(10, n, #select(x->x==(n-1), d)); for (k=1, #v, if ((k != 9) && (v[k] >= v[9]), return(0)); ); return(1); } \\ Michel Marcus, Sep 21 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Halfdan Skjerning, Sep 18 2017
STATUS
approved