OFFSET
1,2
LINKS
PROG
(PARI)
up_to = 2^16;
v304755 = vector(up_to);
m304756 = Map();
find_kth_unused_divisor(k, n, m_inverses) = { my(pd=0); fordiv(n, d, if(!mapisdefined(m_inverses, d), pd=d; k--); if((!k || (d == n)), return(pd))); };
prev=1; for(n=1, up_to, if((try = find_kth_unused_divisor(2, prev, m304756))!=0, mapput(m304756, v304755[n] = try, n), p = A053669(prev); while(mapisdefined(m304756, prev), prev *= p); v304755[n] = prev; mapput(m304756, prev, n)); prev = v304755[n]);
A304755(n) = v304755[n];
A304756(n) = mapget(m304756, n);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 20 2018
STATUS
approved