OFFSET
1,2
LINKS
Sidney Cadot, Table of n, a(n) for n = 1..100
FORMULA
G.f.: Sum_{k>=1} k^(k-1) * x^k/(1 - k^(k-1) * x^k)^2.
If p is prime, a(p) = p + p^(p-1).
MATHEMATICA
a[n_] := Total[Map[#*(n/#)^(n - #) &, Divisors[n]]];
Table[a[n], {n, 1, 100}]
a[n_] := DivisorSum[n, (n/#)^(n-#)*# &]; Array[a, 19] (* Amiram Eldar, Aug 27 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, d*(n/d)^(n-d));
(PARI) my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, k^(k-1)*x^k/(1-k^(k-1)*x^k)^2))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 17 2022
STATUS
approved