OFFSET
1,2
FORMULA
E.g.f.: Sum_{k>0} k * (exp(x^k) - 1).
If p is prime, a(p) = 1 + p * p!.
MATHEMATICA
a[n_] := n! * DivisorSum[n, (n/#) / #! &]; Array[a, 21] (* Amiram Eldar, Aug 30 2023 *)
PROG
(PARI) a(n) = n!*sumdiv(n, d, n/d/d!);
(PARI) my(N=30, x='x+O('x^N)); Vec(serlaplace(sum(k=1, N, k*(exp(x^k)-1))))
(Python)
from math import factorial
from sympy import divisors
def A354863(n):
f = factorial(n)
return sum(f*n//d//factorial(d) for d in divisors(n, generator=True)) # Chai Wah Wu, Jun 09 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 09 2022
STATUS
approved