OFFSET
0,5
COMMENTS
Original name: a simple grammar.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 717
Index entries for linear recurrences with constant coefficients, signature (9,-33,63,-66,36,-8).
FORMULA
E.g.f.: x^2*exp(x)^2-2*exp(x)*x^2+x^2.
Recurrence: {a(1)=0, a(2)=0, a(3)=0, a(4)=24, (2*n^2+6*n+4)*a(n)+(6-3*n^2-3*n)*a(n+1)+(n^2-n)*a(n+2)}.
For n>=3, a(n) = n*(n-1)*(2^n-8)/4. - Vaclav Kotesovec, Nov 27 2012
a(n) = n*A052749(n-1) = 2*n*(n-1)*Stirling2(n-2,2) for n >= 2. - Andrew Howroyd, Aug 08 2020
MAPLE
spec := [S, {B=Set(Z, 1 <= card), S=Prod(B, B, Z, Z)}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
Part[#, Range[1, Length[#], 1]]&@(Array[#!&, Length[#], 0] #)&@CoefficientList[Series[x^2 Exp[x]^2 - 2 Exp[x] x^2 + x^2, {x, 0, 30}], x]//ExpandAll (* Vincenzo Librandi, May 05 2013 *)
PROG
(Magma) [0, 0, 0] cat [n*(n-1)*(2^n-8)/4: n in [3..30]]; // Vincenzo Librandi, May 05 2013
(PARI) a(n) = if(n<4, 0, n*(n-1)*(2^n-8)/4); \\ Joerg Arndt, May 06 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from Vincenzo Librandi, May 05 2013
Name changed by Andrew Howroyd, Aug 08 2020
STATUS
approved