OFFSET
1,1
PROG
(PARI) A077700(n, a=4)={my(c(n, c=vector(10))=for(i=1, #n=digits(n), c[n[i]+1]++); c); for(i=2, n, my(cc=c(a)); for(k=2, oo, k%5 && vecmin(c(k*a)-cc)>=0 && (a*=k) && break)); a} \\ n=2 and optional 2nd arg as starting value yields next term:
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 18 2002
EXTENSIONS
More terms from Ray Chandler, Jul 25 2003
Name edited by M. F. Hasler, Nov 18 2018
STATUS
approved