OFFSET
1,5
COMMENTS
Sum of aliquot divisors (or aliquot parts) of the n-th odd number.
a(n) has a symmetric representation.
FORMULA
a(n) = A001065(2*n-1).
G.f.: Sum_{k>=0} (2*k + 1) * x^(3*k + 2) / (1 - x^(2*k + 1)). - Ilya Gutkovskiy, Aug 20 2021
Sum_{k=1..n} a(k) = (Pi^2/8 - 1)*n^2 + O(n*log(n)). - Amiram Eldar, Mar 17 2024
EXAMPLE
For n = 5 the 5th odd number is 9 and the divisors of 9 are [1, 3, 9] and the sum of the divisors of 9 except for the largest is 1 + 3 = 4, so a(5) = 4.
MATHEMATICA
a[n_] := DivisorSigma[1, 2*n - 1] - 2*n + 1; Array[a, 100] (* Amiram Eldar, Aug 20 2021 *)
Total[Most[Divisors[#]]]&/@Range[1, 161, 2] (* Harvey P. Dale, Sep 29 2024 *)
PROG
(Python)
from sympy import divisors
def a(n): return sum(divisors(2*n-1)[:-1])
print([a(n) for n in range(1, 79)]) # Michael S. Branicky, Aug 20 2021
(PARI) a(n) = sigma(2*n-1) - (2*n-1); \\ Michel Marcus, Aug 20 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Aug 20 2021
STATUS
approved