OFFSET
1,2
EXAMPLE
a(5) =31 since 31 requires 5 steps, but no m < 31 does. Although 23 < 31, 23 requires 6 steps.
PROG
(PARI) {m=36; z=19200000; v=listcreate(m); for(i=1, m, listinsert(v, -1, i)); for(n=1, z, c=1; b=1; k=n; while(b&&c<=m, d=divisors(k); i=matsize(d)[2]-1; z=if(i>0, d[i], 1); p=0; while(z>0, d=divrem(z, 10); z=d[1]; p=10*p+d[2]); z= if(k==1, 1, vecmax(component(factor(k), 1))); q=0; while(z>0, d=divrem(z, 10); z=d[1]; q=10*q+d[2]); a= abs(p-q); if(a==0, b=0, k=a; c++)); if(a==0, if(v[c]<0, v[c]=n; print1([c, n])))); print(); for(i=1, m, print1(v[i], ", "))}
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Oct 11 2002
STATUS
approved