OFFSET
0,4
COMMENTS
Number of permutations of [n] minus the number of compositions of n. - Zerinvary Lajos, Oct 16 2006
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..250
EXAMPLE
a(3) = 2 since the possibilities are {BAC, CAB}. a(4) = 16 since the possibilites are {ACBD, ADBC, BACD, BADC, BCAD, BDAC, CABD, CADB, CBAD, CBDA, CDAB, DABC, DACB, DBAC, DBCA, DCAB}.
MAPLE
a:= n-> n!-ceil(2^(n-1)):
seq(a(n), n=0..30);
MATHEMATICA
nn=30; Range[0, nn]!CoefficientList[Series[1/(1-x)-Exp[2x]/2-1/2, {x, 0, nn}], x] (* Geoffrey Critzer, Mar 17 2014 *)
PROG
(PARI) x= 'x + O('x^50); concat([0, 0, 0], Vec(serlaplace((1+x)/(2*(1-x))-exp(2*x)/2))) \\ G. C. Greubel, Dec 28 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Jan 17 2001
STATUS
approved