login
A356130
a(n) = Sum_{k=1..n} sigma_{n-1}(k).
2
1, 4, 16, 111, 999, 12513, 185683, 3316418, 67810767, 1576561677, 40862702931, 1171104916405, 36722498575799, 1251419967587955, 46034784688102781, 1818440444592581068, 76763036794222996512, 3448830049286378614987, 164309958491233496689189
OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} k^(n-1) * floor(n/k).
a(n) = [x^n] (1/(1-x)) * Sum_{k>=1} k^(n-1) * x^k/(1 - x^k).
MATHEMATICA
a[n_] := Sum[DivisorSigma[n-1, k], {k, 1, n}]; Array[a, 19] (* Amiram Eldar, Jul 28 2022 *)
PROG
(PARI) a(n) = sum(k=1, n, sigma(k, n-1));
(PARI) a(n) = sum(k=1, n, k^(n-1)*(n\k));
(Python)
from math import isqrt
from sympy import bernoulli
def A350130(n): return (((s:=isqrt(n))+1)*((b:=bernoulli(n))-bernoulli(n, s+1))+sum(k**(n-1)*n*((q:=n//k)+1)-b+bernoulli(n, q+1) for k in range(1, s+1)))//n if n>1 else 1 # Chai Wah Wu, Oct 21 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 27 2022
STATUS
approved