OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..387
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} d^(d-1).
G.f.: (1/(1-x)) * Sum_{k>0} k^(k-1) * x^k/(1 - x^k).
PROG
(PARI) a(n) = sum(k=1, n, n\k*k^(k-1));
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, d^(d-1)));
(PARI) my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, k^(k-1)*x^k/(1-x^k))/(1-x))
(Python)
def A355950(n): return n*(1+n**(n-2))+sum(k**(k-1)*(n//k) for k in range(2, n)) if n>1 else 1 # Chai Wah Wu, Jul 21 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 21 2022
STATUS
approved