OFFSET
1,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..170
Gottfried Helms, A dream of a (number-) sequence, 2007-2009.
FORMULA
a(n) = (n-1)!*[(-1)^n + Sum_{d divides n, 1<d<n} d*( -a(d)/d! )^(n/d) ] for n>1 with a(1)=1.
Another recurrence. With FP(n,m) the set of partitions of n with m distinct parts (which could be called fermionic partitions (fp)) and the multinomial numbers M1(fp(n,m)) (given as array in A036038) for any fp(n,m) from FP(n,m): a(n)= 1 - sum( sum(M1(fp)*product(a(k[j]),j=1..m),fp from FP(n,m)),m=2..maxm(n)), with maxm(n):=A003056(n) and the distinct parts k[j], j=1,...,m, of the partition fp(n,m). Inputs a(1)=1, a(2)=1. See also array A008289(n,m) for the cardinality of the set FP(n,m). - Wolfdieter Lang, Feb 20 2009
EXAMPLE
exp(x) = (1+x)*(1+x^2/2!)*(1-2*x^3/3!)*(1+9*x^4/4!)*(1-24*x^5/5!)* (1+130*x^6/6!)*(1-720*x^7/7!)*(1+8505*x^8/8!)*(1-35840*x^9/9!)*(1+412776*x^10/10!)*(1-3628800*x^11/11!)*...*(1+a(n)*x^n/n!)*...
Another recurrence: n=6; m=1,2,3=maxm(6)=A003056(6); fp(6,2) from {(1,5),(2,4)}, fp(6,3)=(1,2,3); a(6)= 1 - ( 6*a(1)*a(5) + 15*a(2)*a(4) + 60*a(1)*a(2)*a(3)). Check: 1 - (6*1*(-24) + 15*1*9 +60*1*1*(-2)) = 130 = a(6). - Wolfdieter Lang, Feb 20 2009
MAPLE
with(numtheory):
a:= proc(n) option remember; `if`(n=1, 1, (n-1)!*((-1)^n+
add(d*(-a(d)/d!)^(n/d), d=divisors(n) minus {1, n})))
end:
seq(a(n), n=1..30); # Alois P. Heinz, Aug 14 2012
MATHEMATICA
max = 22; f[x_] := Product[1 + a[n] x^n/n!, {n, 1, max}]; coes = CoefficientList[ Series[f[x] - Exp[x], {x, 0, max}], x]; sol = Solve[ Thread[coes == 0]][[1]]; Table[a[n] /. sol, {n, 1, max}] (* Jean-François Alcover, Nov 28 2011 *)
a[1] = 1; a[n_] := a[n] = (n-1)!*((-1)^n + Sum[d*(-a[d]/d!)^(n/d), {d, Divisors[n] ~Complement~ {1, n}}]);
Array[a, 30] (* Jean-François Alcover, Jan 11 2018 *)
PROG
(PARI) {a(n)=if(n<1, 0, if(n==1, 1, (n-1)!*((-1)^n + sumdiv(n, d, if(d<n&d>1, d*(-a(d)/d!)^(n/d))))))}
for(n=1, 30, print1(a(n), ", "))
(PARI) /* As coefficients in product g.f.: */
{a(n)=if(n<1, 0, n!*polcoeff(exp(x +x*O(x^n))/prod(k=0, n-1, 1+a(k)*x^k/k! +x*O(x^n)), n))}
for(n=1, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nice,sign
AUTHOR
Paul D. Hanna, Feb 14 2008
STATUS
approved