login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #25 Aug 30 2023 02:00:25

%S 1,5,37,601,14401,520801,25401601,1626189601,131682257281,

%T 13168407228481,1593350922240001,229442707280223361,

%U 38775788043632640001,7600054676241325858561,1710012252750418295078401,437763137119219420513804801,126513546505547170185216000001

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

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

%F If p is prime, a(p) = 1 + (p!)^2 = A020549(p).

%t a[n_] := n! * DivisorSum[n, (n/#)! / #! &]; Array[a, 17] (* _Amiram Eldar_, Aug 30 2023 *)

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

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

%o (Python)

%o from math import factorial

%o from sympy import divisors

%o def A354862(n):

%o f = factorial(n)

%o return sum(f*(a := factorial(n//d))//(b:= factorial(d)) + (f*b//a if d**2 < n else 0) for d in divisors(n,generator=True) if d**2 <= n) # _Chai Wah Wu_, Jun 09 2022

%Y Cf. A020549, A057625, A121860, A354843, A354863.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Jun 09 2022