OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
sigma = Table[DivisorSigma[1, n], {n, 1, 50}]; sigma * Accumulate[sigma] (* Amiram Eldar, Feb 26 2020 *)
PROG
(Python)
from math import isqrt
from sympy import divisor_sigma
def A143238(n): return (-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1, s+1))>>1)*divisor_sigma(n) # Chai Wah Wu, Oct 23 2023
(Magma)
A143238:= func< n | DivisorSigma(1, n)*(&+[k*Floor(n/k): k in [1..n]]) >;
[A143238(n): n in [1..100]]; // G. C. Greubel, Sep 12 2024
(SageMath)
def A143238(n): return sigma(n, 1)*sum(k*int(n//k) for k in range(1, n+1))
[A143238(n) for n in range(1, 101)] # G. C. Greubel, Sep 12 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Aug 01 2008
EXTENSIONS
More terms from Amiram Eldar, Feb 26 2020
STATUS
approved