OFFSET
4,1
LINKS
Aaron Robertson, Permutations restricted by two distinct patterns of length three, arXiv:math/0012029 [math.CO], 2000.
Index entries for linear recurrences with constant coefficients, signature (6,-12,8).
FORMULA
For n>=7, a(n) = (n^2+21*n-28)*2^(n-9).
G.f.: x^4*(x-1)^2*(2*x^3-2*x^2+6*x-3) / (2*x-1)^3. [Colin Barker, Jan 31 2013]
MATHEMATICA
LinearRecurrence[{6, -12, 8}, {3, 6, 17, 42, 102, 242}, 40] (* Harvey P. Dale, Apr 10 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Oct 30 2003
STATUS
approved