login
A326123
a(n) is the sum of all divisors of the first n odd numbers.
10
1, 5, 11, 19, 32, 44, 58, 82, 100, 120, 152, 176, 207, 247, 277, 309, 357, 405, 443, 499, 541, 585, 663, 711, 768, 840, 894, 966, 1046, 1106, 1168, 1272, 1356, 1424, 1520, 1592, 1666, 1790, 1886, 1966, 2087, 2171, 2279, 2399, 2489, 2601, 2729, 2849, 2947, 3103, 3205, 3309, 3501, 3609, 3719
OFFSET
1,2
COMMENTS
a(n)/A326124(n) converges to 3/5.
a(n) is also the total area of the terraces of the first n odd-indexed levels of the stepped pyramid described in A245092.
LINKS
FORMULA
a(n) = A024916(2n) - A326124(n).
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
Partial sums of A008438.
Sequence in context: A023245 A125003 A062718 * A288112 A225250 A105914
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Jun 07 2019
STATUS
approved