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.

A228394 The number of permutations of length n sortable by 2 prefix block transpositions.

Original entry on oeis.org

1, 2, 6, 21, 61, 146, 302, 561, 961, 1546, 2366, 3477, 4941, 6826, 9206, 12161, 15777, 20146, 25366, 31541, 38781, 47202, 56926, 68081, 80801, 95226, 111502, 129781, 150221, 172986, 198246, 226177, 256961, 290786, 327846, 368341, 412477, 460466, 512526, 568881
Offset: 1

Views

Author

Vincent Vatter, Aug 21 2013

Keywords

Examples

			There are 3 permutations of length 4 that cannot be sorted by 2 prefix block transpositions.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1/x) (-1 - (x^2 + 1) (6 x^2 - 4 x + 1)/(x - 1)^5), {x, 0, 50}], x] (* Bruno Berselli, Aug 22 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{1,2,6,21,61},40] (* Harvey P. Dale, May 28 2018 *)

Formula

G.f.: -1 -(x^2 + 1)*(6*x^2 - 4*x + 1)/(x - 1)^5.
a(n) = 1 + (n-1)*n*(3*n^2-11*n+16)/12. [Bruno Berselli, Aug 22 2013]