login
A352014
a(n) = Sum_{p|n, p prime} (-1)^(n/p+1) * (n-1)!/(p-1)!.
3
0, 1, 1, -6, 1, 60, 1, -5040, 20160, 347760, 1, -59875200, 1, 6218372160, 47221574400, -1307674368000, 1, 177843714048000, 1, -126713646259200000, 1219830034655232000, 51090928092415411200, 1, -38778025108327464960000, 25852016738884976640000
OFFSET
1,4
FORMULA
E.g.f.: Sum_{p prime} log(1+x^p)/p!.
MATHEMATICA
a[n_] := Sum[(-1)^(n/p + 1)*(n - 1)!/(p - 1)!, {p, FactorInteger[n][[;; , 1]]}]; a[1] = 0; Array[a, 25] (* Amiram Eldar, Oct 04 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, isprime(d)*(-1)^(n/d+1)*(n-1)!/(d-1)!);
(PARI) my(N=40, x='x+O('x^N)); concat(0, Vec(serlaplace(sum(k=1, N, isprime(k)*log(1+x^k)/k!))))
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Feb 28 2022
STATUS
approved