OFFSET
1,2
COMMENTS
Partial sums of the even-indexed terms of Chowla's function A048050.
a(n) has a symmetric representation.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (5*Pi^2/24 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, May 15 2023
MAPLE
a:= proc(n) option remember; `if`(n=0, 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[n_] := DivisorSigma[1, 2*n] - 2*n - 1; Accumulate @ Array[s, 50] (* Amiram Eldar, Aug 19 2021 *)
PROG
(Python)
from sympy import divisors
from itertools import accumulate
def A346880(n): return sum(divisors(2*n)[1:-1])
def aupton(nn): return list(accumulate(A346880(n) for n in range(1, nn+1)))
print(aupton(52)) # Michael S. Branicky, Aug 19 2021
(Python)
from math import isqrt
def A346870(n): return (t:=isqrt(m:=n>>1))**2*(t+1) - sum((q:=m//k)*((k<<1)+q+1) for k in range(1, t+1))-3*((s:=isqrt(n))**2*(s+1) - sum((q:=n//k)*((k<<1)+q+1) for k in range(1, s+1))>>1)-n*(n+2) # Chai Wah Wu, Nov 02 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Aug 18 2021
STATUS
approved