OFFSET
1,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
PROG
(PARI) isok(n)={my(f=vector(10)); foreach(digits(n), t, f[1+t]++); vecmax(f)<=vecmin(f)+1 && sum(k=1, 9, f[k]!=f[k+1])<=2}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Andrew Howroyd, Sep 19 2024
STATUS
approved