OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000 (based on Hans Havermann's factorization of A156552)
PROG
(PARI)
up_to = 3000;
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; };
A000265(n) = (n>>valuation(n, 2));
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
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 };
v350065 = rgs_transform(vector(up_to, n, A350063(n)));
A350065(n) = v350065[n];
(PARI)
\\ Version using the factorization file available at https://oeis.org/A156552/a156552.txt
v156552sigs = readvec("a156552.txt");
up_to = #v156552sigs;
A350063(n) = if(n<=2, n-1, my(es=v156552sigs[n][2]); if(n%2, es = vector(#es-1, i, es[1+i])); my(f=vecsort(es, , 4), p=0); prod(i=1, #f, (p=nextprime(p+1))^f[i]));
v350065 = rgs_transform(vector(up_to, n, A350063(n)));
A350065(n) = v350065[n]; \\ Antti Karttunen, Jan 29 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 29 2022
STATUS
approved