A362059 Total number of even divisors of all positive integers <= n.
0, 1, 1, 3, 3, 5, 5, 8, 8, 10, 10, 14, 14, 16, 16, 20, 20, 23, 23, 27, 27, 29, 29, 35, 35, 37, 37, 41, 41, 45, 45, 50, 50, 52, 52, 58, 58, 60, 60, 66, 66, 70, 70, 74, 74, 76, 76, 84, 84, 87, 87, 91, 91, 95, 95, 101, 101, 103, 103, 111, 111, 113, 113, 119, 119, 123, 123, 127, 127, 131, 131, 140, 140, 142, 142, 146
Offset: 1
Programs
-
Mathematica
d[n_] := (e = IntegerExponent[n, 2]) * DivisorSigma[0, n/2^e]; Accumulate@ Array[d, 100] (* Amiram Eldar, Apr 07 2023 *)
-
Python
from math import isqrt def A362059(n): return -(q:=isqrt(m:=n>>1))**2+(sum(m//k for k in range(1, q+1))<<1) # Chai Wah Wu, Apr 26 2023
Comments