login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A346869
Sum of all divisors, except the smallest and the largest of every number, of the first n odd numbers.
4
0, 0, 0, 0, 3, 3, 3, 11, 11, 11, 21, 21, 26, 38, 38, 38, 52, 64, 64, 80, 80, 80, 112, 112, 119, 139, 139, 155, 177, 177, 177, 217, 235, 235, 261, 261, 261, 309, 327, 327, 366, 366, 388, 420, 420, 440, 474, 498, 498, 554, 554, 554, 640, 640, 640, 680, 680, 708, 772, 796
OFFSET
1,5
COMMENTS
Partial sums of the odd-indexed terms of Chowla's function A048050.
a(n) has a symmetric representation.
MAPLE
a:= proc(n) option remember; `if`(n=1, 0,
a(n-1)+numtheory[sigma](2*n-1)-2*n)
end:
seq(a(n), n=1..60); # Alois P. Heinz, Aug 19 2021
MATHEMATICA
s[1] = 0; s[n_] := DivisorSigma[1, 2*n - 1] - 2*n; Accumulate @ Array[s, 50] (* Amiram Eldar, Aug 19 2021 *)
Accumulate[Join[{0}, Table[DivisorSigma[1, n]-n-1, {n, 3, 151, 2}]]] (* Harvey P. Dale, Jul 29 2023 *)
PROG
(Python)
from sympy import divisors
from itertools import accumulate
def A346879(n): return sum(divisors(2*n-1)[1:-1])
def aupton(nn): return list(accumulate(A346879(n) for n in range(1, nn+1)))
print(aupton(60)) # Michael S. Branicky, Aug 19 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Aug 18 2021
STATUS
approved