OFFSET
1,2
LINKS
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