login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A366889
Dirichlet inverse of the highest power of two that divides the sum of divisors of n.
3
1, -1, -4, 0, -2, 4, -8, 0, 15, 2, -4, 0, -2, 8, 8, 0, -2, -15, -4, 0, 32, 4, -8, 0, 3, 2, -64, 0, -2, -8, -32, 0, 16, 2, 16, 0, -2, 4, 8, 0, -2, -32, -4, 0, -30, 8, -16, 0, 63, -3, 8, 0, -2, 64, 8, 0, 16, 2, -4, 0, -2, 32, -120, 0, 4, -16, -4, 0, 32, -16, -8, 0, -2, 2, -12, 0, 32, -8, -16, 0, 272, 2, -4, 0, 4, 4, 8, 0
OFFSET
1,3
COMMENTS
Multiplicative because A082903 is.
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A082903(n/d) * a(d).
PROG
(PARI)
A082903(n) = (2^valuation(sigma(n), 2));
memoA366889 = Map();
A366889(n) = if(1==n, 1, my(v); if(mapisdefined(memoA366889, n, &v), v, v = -sumdiv(n, d, if(d<n, A082903(n/d)*A366889(d), 0)); mapput(memoA366889, n, v); (v)));
(Python)
from functools import lru_cache
from sympy import divisor_sigma, divisors
@lru_cache(maxsize=None)
def A366889(n): return 1 if n==1 else -sum((1<<(~(m:=int(divisor_sigma(d))) & m-1).bit_length())*A366889(n//d) for d in divisors(n, generator=True) if d>1) # Chai Wah Wu, Jan 03 2024
CROSSREFS
Cf. A000203, A082903, A336937, A359548, A359549 (parity of terms).
Sequence in context: A279415 A201399 A145894 * A359589 A021881 A021717
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jan 03 2024
STATUS
approved