login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A093374
Number of 1-2-3-avoiding permutations with exactly thrice the 1-3-2 pattern.
1
1, 5, 18, 57, 168, 472, 1280, 3376, 8704, 22016, 54784, 134400, 325632, 780288, 1851392, 4354048, 10158080, 23527424, 54132736, 123797504, 281542656, 637009920, 1434451968, 3215982592, 7180648448, 15971909632, 35399925760, 78198603776, 172201345024
OFFSET
4,2
FORMULA
a(n) = C(n-3, 1)2^(n-4) + C(n-3, 1)2^(n-5) + C(n-3, 2)2^(n-7) for n<4, a(n) = 0.
G.f.: x^4*(1 - 3*x + 2*x^2 + x^3) / (1 - 2*x)^4. Corrected by Colin Barker, Feb 13 2017
From Colin Barker, Feb 13 2017: (Start)
a(n) = 2^(n-8)*(-120 + 38*n - 3*n^2 + n^3) / 3 for n>3.
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4) for n>7.
(End)
MATHEMATICA
LinearRecurrence[{8, -24, 32, -16}, {1, 5, 18, 57}, 30] (* Harvey P. Dale, Apr 22 2024 *)
PROG
(PARI) a(n)=if(n<4, 0, 2^(n-4)*binomial(n-3, 1)+2^(n-5)*binomial(n-3, 2)+2^(n-7)*binomial(n-4, 3))
(PARI) Vec(x^4*(1 - 3*x + 2*x^2 + x^3) / (1 - 2*x)^4 + O(x^30)) \\ Colin Barker, Feb 13 2017
CROSSREFS
Sequence in context: A307572 A325923 A335720 * A258109 A000745 A343802
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Apr 28 2004
STATUS
approved