This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A342629 #23 Jun 19 2022 15:23:04 %S A342629 1,3,10,69,626,7866,117650,2101265,43047451,1000390658,25937424602, %T A342629 743069105634,23298085122482,793728614541474,29192926269590300, %U A342629 1152925902670135553,48661191875666868482,2185913413229070900339,104127350297911241532842 %N A342629 a(n) = Sum_{d|n} (n/d)^(n-d). %H A342629 Seiichi Manyama, <a href="/A342629/b342629.txt">Table of n, a(n) for n = 1..387</a> %F A342629 G.f.: Sum_{k>=1} k^(k-1) * x^k/(1 - k^(k-1) * x^k). %F A342629 If p is prime, a(p) = 1 + p^(p-1). %t A342629 a[n_] := DivisorSum[n, (n/#)^(n - #) &]; Array[a, 20] (* _Amiram Eldar_, Mar 17 2021 *) %o A342629 (PARI) a(n) = sumdiv(n, d, (n/d)^(n-d)); %o A342629 (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))) %o A342629 (Python) %o A342629 from sympy import divisors %o A342629 def A342629(n): return sum((n//d)**(n-d) for d in divisors(n,generator=True)) # _Chai Wah Wu_, Jun 19 2022 %Y A342629 Cf. A023887, A055225, A308668, A342628. %K A342629 nonn %O A342629 1,2 %A A342629 _Seiichi Manyama_, Mar 16 2021