|
|
A336937
|
|
The 2-adic valuation of sigma(n), the sum of divisors of n.
|
|
11
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
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)).
|
|
LINKS
|
|
|
FORMULA
|
Additive with a(2^e) = 0, a(p^2e) = 0, a(p^(2e-1)) = A007814(1+p) + A007814(e).
|
|
MATHEMATICA
|
a[n_] := IntegerExponent[DivisorSigma[1, n], 2]; Array[a, 100] (* Amiram Eldar, Jul 04 2022 *)
|
|
PROG
|
(PARI) A336937(n) = valuation(sigma(n), 2);
(PARI)
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|