cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A116725 Number of permutations of length n which avoid the patterns 132, 3421, 4231.

Original entry on oeis.org

1, 2, 5, 12, 26, 52, 99, 184, 340, 632, 1189, 2268, 4382, 8556, 16839, 33328, 66216, 131888, 263113, 525428, 1049906, 2098692, 4196075, 8390632, 16779516, 33557032, 67111789, 134221004, 268439110, 536874972, 1073746319, 2147488608, 4294972752, 8589940576
Offset: 1

Views

Author

Lara Pudwell, Feb 26 2006

Keywords

Crossrefs

Cf. A134398.

Programs

  • GAP
    List([1..40], n-> (3*2^n +2*n -3*n^2 +n^3)/6); # G. C. Greubel, Nov 29 2019
  • Magma
    [(3*2^n +2*n -3*n^2 +n^3)/6: n in [1..40]]; // G. C. Greubel, Nov 29 2019
    
  • Maple
    seq((3*2^n +2*n -3*n^2 +n^3)/6, n=1..40); # G. C. Greubel, Nov 29 2019
  • Mathematica
    Table[(3*2^n +2*n -3*n^2 +n^3)/6, {n, 40}] (* G. C. Greubel, Nov 29 2019 *)
  • PARI
    Vec(x*(1 -4*x +7*x^2 -6*x^3 +x^4)/((1-x)^4*(1-2*x)) + O(x^40)) \\ Colin Barker, Oct 20 2017
    
  • PARI
    vector(40, n, (3*2^n +2*n -3*n^2 +n^3)/6) \\ G. C. Greubel, Nov 29 2019
    
  • Sage
    [(3*2^n +2*n -3*n^2 +n^3)/6 for n in (1..40)] # G. C. Greubel, Nov 29 2019
    

Formula

G.f.: x*(1 - 4*x + 7*x^2 - 6*x^3 + x^4) / ((1 - x)^4*(1 - 2*x)).
Row sums of triangle A134398. Also, binomial transform of [1, 1, 2, 2, 1, 1, 1, ...]. - Gary W. Adamson, Oct 23 2007
From Colin Barker, Oct 20 2017: (Start)
a(n) = (3*2^n + 2*n - 3*n^2 + n^3)/6.
a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 9*a(n-4) + 2*a(n-5) for n>5.
(End)
Showing 1-1 of 1 results.