OFFSET
1,2
COMMENTS
LINKS
PROG
(PARI)
up_to = 65537;
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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
A348717(n) = { my(f=factor(n)); if(#f~>0, my(pi1=primepi(f[1, 1])); for(k=1, #f~, f[k, 1] = prime(primepi(f[k, 1])-pi1+1))); factorback(f); }; \\ From A348717
Aux352899(n) = if(n<=2, -n, A352892(n));
v352899 = rgs_transform(vector(up_to, n, Aux352899(n)));
A352899(n) = v352899[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 08 2022
STATUS
approved