OFFSET
1,3
FORMULA
E.g.f.: Sum_{k>=1} -(-x)^k / (k! * (1 + (-x)^k)).
E.g.f.: Sum_{k>=1} (-1)^k * (exp((-x)^k) - 1). [corrected by Ilya Gutkovskiy, May 14 2022]
MATHEMATICA
a[n_] := n! Sum[(-1)^(n - d)/(n/d)!, {d, Divisors[n]}]; Table[a[n], {n, 1, 22}]
nmax = 22; CoefficientList[Series[Sum[-(-x)^k/(k! (1 + (-x)^k)), {k, 1, nmax}], {x, 0, nmax}], x] Range[0, nmax]! // Rest
PROG
(PARI) a(n) = {n!*sumdiv(n, d, (-1)^(n - d) / (n/d)!)} \\ Andrew Howroyd, Sep 14 2019
(Magma) [Factorial(n)*(&+[(-1)^(n-d)/Factorial(n div d):d in Divisors(n)]):n in [1..22]]; // Marius A. Burtea, Sep 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 14 2019
STATUS
approved