cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A366889 Dirichlet inverse of the highest power of two that divides the sum of divisors of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 03 2024

Keywords

Comments

Multiplicative because A082903 is.

Crossrefs

Cf. A000203, A082903, A336937, A359548, A359549 (parity of terms).

Programs

  • 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(dA082903(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

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA082903(n/d) * a(d).