OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ Pi^2 * n^2 / 8. - Vaclav Kotesovec, Aug 18 2021
EXAMPLE
For n = 3 the first three odd numbers are [1, 3, 5] and their divisors are [1], [1, 3], [1, 5] respectively, and the sum of these divisors is 1 + 1 + 3 + 1 + 5 = 11, so a(3) = 11.
MAPLE
ListTools:-PartialSums(map(numtheory:-sigma, [seq(i, i=1..200, 2)])); # Robert Israel, Jun 12 2019
MATHEMATICA
Accumulate@ DivisorSigma[1, Range[1, 109, 2]] (* Michael De Vlieger, Jun 09 2019 *)
PROG
(PARI) terms(n) = my(s=0, i=0); for(k=0, n-1, if(i>=n, break); s+=sigma(2*k+1); print1(s, ", "); i++)
/* Print initial 50 terms as follows: */
terms(50) \\ Felix Fröhlich, Jun 08 2019
(PARI) a(n) = sum(k=1, 2*n-1, if (k%2, sigma(k))); \\ Michel Marcus, Jun 08 2019
(Python)
from math import isqrt
def A326123(n): return (-(s:=isqrt(r:=n<<1))**2*(s+1) + sum((q:=r//k)*((k<<1)+q+1) for k in range(1, s+1))>>1) -(t:=isqrt(m:=n>>1))**2*(t+1)+sum((q:=m//k)*((k<<1)+q+1) for k in range(1, t+1))+3*((u:=isqrt(n))**2*(u+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1, u+1))>>1) # Chai Wah Wu, Nov 01 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Jun 07 2019
STATUS
approved