OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..387
FORMULA
G.f.: Sum_{k>=1} k^(k-1) * x^k/(1 - k^(k-1) * x^k).
If p is prime, a(p) = 1 + p^(p-1).
MATHEMATICA
a[n_] := DivisorSum[n, (n/#)^(n - #) &]; Array[a, 20] (* Amiram Eldar, Mar 17 2021 *)
PROG
(PARI) a(n) = sumdiv(n, 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)))
(Python)
from sympy import divisors
def A342629(n): return sum((n//d)**(n-d) for d in divisors(n, generator=True)) # Chai Wah Wu, Jun 19 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 16 2021
STATUS
approved