login
A358660
a(n) = Sum_{d|n} d * (n/d)^(n-d).
1
1, 4, 12, 76, 630, 7968, 117656, 2105416, 43048917, 1000781420, 25937424612, 743130116112, 23298085122494, 793742455829456, 29192926758107760, 1152930300766980112, 48661191875666868498, 2185915267189632382650, 104127350297911241532860
OFFSET
1,2
LINKS
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