login
a(n) = n! * Sum_{d|n} d^(n - d) / (d! * (n/d)!).
2

%I #23 Jul 11 2023 08:57:05

%S 1,2,2,26,2,2582,2,268802,7348322,51120722,2,299332756802,2,

%T 7157951760962,18701679546950402,613777679843328002,2,

%U 3250742570192384467202,2,29411516073133093829529602,1146522800008167069616128002,4017001663590220290585602,2

%N a(n) = n! * Sum_{d|n} d^(n - d) / (d! * (n/d)!).

%H Robert Israel, <a href="/A354898/b354898.txt">Table of n, a(n) for n = 1..305</a>

%F E.g.f.: Sum_{k>0} (exp((k * x)^k) - 1)/(k^k * k!).

%F If p is prime, a(p) = 2.

%p f:= proc(n) local d; n! * add(d^(n-d)/(d! * (n/d)!), d = numtheory:-divisors(n)) end proc:

%p map(f, [$1..30]); # _Robert Israel_, Jul 10 2023

%t a[n_] := n! * DivisorSum[n, #^(n - #)/(#! * (n/#)!) &]; Array[a, 23] (* _Amiram Eldar_, Jun 11 2022 *)

%o (PARI) a(n) = n!*sumdiv(n, d, d^(n-d)/(d!*(n/d)!));

%o (PARI) my(N=30, x='x+O('x^N)); Vec(serlaplace(sum(k=1, N, (exp((k*x)^k)-1)/(k^k*k!))))

%Y Cf. A121860, A354845, A354891, A354893, A354897.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Jun 11 2022