OFFSET
1,2
COMMENTS
LINKS
PROG
(PARI)
up_to = 100000;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A373986(n) = { my(f=factor(n), m=1, s=0); for(i=1, #f~, my(x=prod(i=1, primepi(f[i, 1]), prime(i))); s += f[i, 2]*x; m *= x^f[i, 2]); s/gcd(m, s); };
v373988 = rgs_transform(vector(up_to, n, A373986(n)));
A373988(n) = v373988[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 25 2024
STATUS
approved