OFFSET
1,3
LINKS
PROG
(PARI)
default(parisizemax, 2^31);
up_to_e = 18;
up_to = (2 + 2^up_to_e);
v050376 = vector(2+up_to_e);
A050376(n) = v050376[n];
ispow2(n) = (n && !bitand(n, n-1));
i = 0; for(n=1, oo, if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == 2+up_to_e, break));
v303760 = vector(up_to);
m_inverses = Map();
prev=1; for(n=1, up_to, fordiv(prev, d, if(!mapisdefined(m_inverses, d), v303760[n] = d; mapput(m_inverses, d, n); break)); if(!v303760[n], apu = prev; while(mapisdefined(m_inverses, try = prev*A053669(apu)), apu *= A053669(apu)); v303760[n] = try; mapput(m_inverses, try, n)); prev = v303760[n]);
A303760(n) = v303760[n+1];
A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
m303772 = Map();
for(n=0, up_to-1, mapput(m303772, A303771(n), n));
A303772(n) = mapget(m303772, n);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Antti Karttunen, May 02 2018
STATUS
approved