login
A364574
Dirichlet inverse of A005941.
3
1, -2, -3, 0, -5, 6, -9, 0, 2, 10, -17, 0, -33, 18, 19, 0, -65, -4, -129, 0, 35, 34, -257, 0, 12, 66, 0, 0, -513, -38, -1025, 0, 67, 130, 69, 0, -2049, 258, 131, 0, -4097, -70, -8193, 0, -22, 514, -16385, 0, 56, -24, 259, 0, -32769, 0, 133, 0, 515, 1026, -65537, 0, -131073, 2050, -42, 0, 261, -134, -262145, 0, 1027
OFFSET
1,2
LINKS
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A005941(n/d) * a(d).
a(p) = -A005941(p) for all primes p.
PROG
(PARI)
A005941(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]); (1+res) }; \\ (After David A. Corneth's program for A156552)
memoA364574 = Map();
A364574(n) = if(1==n, 1, my(v); if(mapisdefined(memoA364574, n, &v), v, v = -sumdiv(n, d, if(d<n, A005941(n/d)*A364574(d), 0)); mapput(memoA364574, n, v); (v)));
CROSSREFS
Cf. also A324640.
Sequence in context: A291305 A004179 A324640 * A122830 A375328 A344137
KEYWORD
sign
AUTHOR
Antti Karttunen, Aug 05 2023
STATUS
approved