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.

A216963 Triangle read by rows, arising in enumeration of permutations by cyclic peaks, cycles and fixed points.

Original entry on oeis.org

1, 0, 1, 1, 1, 4, 5, 11, 28, 5, 41, 153, 71, 162, 872, 759, 61, 715, 5191, 7262, 1665, 3425, 32398, 66510, 29778, 1385, 17722, 211937, 601080, 443231, 60991, 98253, 1451599, 5446847, 5994473, 1642877, 50521, 580317, 10393114, 49940615, 76889330, 35162440, 3249025
Offset: 0

Views

Author

N. J. A. Sloane, Sep 27 2012

Keywords

Comments

See Ma and Chow (2012) for precise definition (cf. Proposition 3).

Examples

			Triangle begins:
:   1;
:   0;
:   1;
:   1,    1;
:   4,    5;
:  11,   28,    5;
:  41,  153,   71;
: 162,  872,  759,   61;
: 715, 5191, 7262, 1665;
...
		

Crossrefs

Column k=0 gives A000296.
Row sums give A000166.
T(2n+1,n) gives A000364(n) for n>0.

Programs

  • Maple
    p:= proc(n) option remember; expand(`if`(n<4,
          [1, 0, x, x*(1+q)][n+1], (n-1)*q*p(n-1)+
          2*q*(1-q)*diff(p(n-1), q)+x*(1-q)*
          diff(p(n-1), x)+(n-1)*x*p(n-2)))
        end:
    T:= n-> (t-> seq(coeff(t, q, i), i=0..
             max(0, degree(t))))(subs(x=1, p(n))):
    seq(T(n), n=0..15);  # Alois P. Heinz, Apr 13 2017
  • Mathematica
    p[0] = 1; p[1] = 0; p[2] = x; p[3] = (1 + q) x;
    p[n_] := p[n] = Expand[(n - 1) q p[n - 1] + 2 q (1 - q) D[p[n - 1], q] + x (1 - q) D[p[n - 1], x] + (n - 1) x p[n - 2]];
    T[n_] := CoefficientList[p[n] /. x -> 1 , q]; T[1] = {0};
    Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Nov 08 2017 *)
  • PARI
    tabf(m) = {P = x; M = subst(P, x, 1); for (d=0, poldegree(M, q), print1(polcoeff(M, d, q), ", "); ); print(""); Q = (1+q)*x; M = subst(Q, x, 1); for (d=0, poldegree(M, q), print1(polcoeff(M, d, q), ", "); ); print(""); for (n=3, m, newP = n*q*Q + 2*q*(1-q)*deriv(Q,q) + x*(1-q)*deriv(Q,x) + n*x*P; M = subst(newP, x, 1); for (d=0, poldegree(M, q), print1(polcoeff(M, d, q), ", "); ); print(""); P = Q; Q = newP;);} \\ Michel Marcus, Feb 09 2013

Extensions

More terms from Michel Marcus, Feb 09 2013
One row for T(0,0)=1 prepended by Alois P. Heinz, Apr 13 2017