|
|
A076424
|
|
Smallest number that requires n steps to reach 0 when iterating the mapping k -> abs(reverse(lpd(k))-reverse(Lpf(k))). lpd(k) is the largest proper divisor and Lpf(k) is the largest prime factor of k.
|
|
1
|
|
|
1, 2, 3, 12, 31, 23, 56, 102, 193, 257, 570, 1129, 4970, 3229, 11551, 11969, 24232, 20094, 24103, 35996, 100090, 222284, 116269, 231488, 388768, 1751753, 2046872, 1140163, 1149979, 2156214, 3199384, 2971734, 7018074, 10163234, 13135933
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|