OFFSET
1,3
LINKS
FORMULA
For n >= 1: (Start)
Among many identities given in A156552 that apply here as well we have for example the following ones:
(End)
PROG
(PARI)
up_to = 26927;
A156552(n) = {my(f = factor(n), 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}; \\ From A156552
A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p, q, u); v[2] = 3; v[1] = 5; mapput(xs, 1, 1); mapput(xs, 2, 2); mapput(xs, 3, 3); for(n=4, up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs, primepi(q), n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); };
v332806 = A332806list(up_to);
A332806(n) = v332806[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 28 2020
STATUS
approved