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.

A336937 The 2-adic valuation of sigma(n), the sum of divisors of n.

Original entry on oeis.org

0, 0, 2, 0, 1, 2, 3, 0, 0, 1, 2, 2, 1, 3, 3, 0, 1, 0, 2, 1, 5, 2, 3, 2, 0, 1, 3, 3, 1, 3, 5, 0, 4, 1, 4, 0, 1, 2, 3, 1, 1, 5, 2, 2, 1, 3, 4, 2, 0, 0, 3, 1, 1, 3, 3, 3, 4, 1, 2, 3, 1, 5, 3, 0, 2, 4, 2, 1, 5, 4, 3, 0, 1, 1, 2, 2, 5, 3, 4, 1, 0, 1, 2, 5, 2, 2, 3, 2, 1, 1, 4, 3, 7, 4, 3, 2, 1, 0, 2, 0, 1, 3, 3, 1, 6
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2020

Keywords

Comments

Equally, the 2-adic valuation of A000593(n), the sum of odd divisors of n.
Proof for the given additive formula: It's easy to see that for all powers of 2 and all even powers of odd primes the result is zero. Thus assuming p is an odd prime, factorize sigma(p^(2e-1)) = (1 + p + p^2 + ... + p^(2e-1)) as (1+p)*(1 + u + u^2 + u^3 + ... + u^(e-1)), where u=p^2. Note that u [and its powers] are always of the form 4k+1, thus the 2-adic valuation of that sum is A007814(e) [see my Aug 15 2020 comment there] which when added to the 2-adic valuation of 1+p then gives the 2-adic valuation for whole sigma(p^(2e-1)).

Crossrefs

One less than A286357.
Cf. A000035, A000203, A000265, A000593, A007814, A028982 (positions of zeros), A161942, A295664, A336932.

Programs

  • Mathematica
    a[n_] := IntegerExponent[DivisorSigma[1, n], 2]; Array[a, 100] (* Amiram Eldar, Jul 04 2022 *)
  • PARI
    A336937(n) = valuation(sigma(n),2);
    
  • PARI
    A007814(n) = valuation(n,2);
    A336937(n) = { my(f=factor(n)); sum(i=1,#f~,(f[i,1]%2) * (f[i,2]%2) * (A007814(1+f[i,1])+A007814(1+f[i,2])-1)); };
    
  • Python
    from sympy import divisor_sigma
    def A336937(n): return (~(m:=int(divisor_sigma(n))) & m-1).bit_length() # Chai Wah Wu, Jul 01 2022

Formula

a(n) = A007814(A000203(n)) = A007814(A000593(n)).
Additive with a(2^e) = 0, a(p^2e) = 0, a(p^(2e-1)) = A007814(1+p) + A007814(e).
For n with factorization p_1^e_1 * ... * p_k^e_k, a(n) = Sum_{i=1..k} A000035(p_i) * A000035(e_i) * (A007814(1+p_i)+A007814(1+e_i)-1).
a(n) = A286357(n)-1.
a(n) = a(2*n) = a(A000265(n)).
For any odd n, a(n) >= A295664(n).
a(A003961(n)) = A336932(n).
A161942(n) = A000203(n) / (2^a(n)).