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.

A262372 Number T(n,k) of ordered pairs (p,q) of permutations of [n] with equal up-down signatures and p(1)=q(1)=k if n>0; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 2, 0, 10, 8, 8, 10, 0, 88, 68, 64, 68, 88, 0, 1216, 952, 852, 852, 952, 1216, 0, 24176, 19312, 17008, 16328, 17008, 19312, 24176, 0, 654424, 533544, 467696, 438496, 438496, 467696, 533544, 654424
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2015

Keywords

Examples

			T(4,1) = 10: (1234,1234), (1243,1243), (1243,1342), (1324,1324), (1324,1423), (1342,1243), (1342,1342), (1423,1324), (1423,1423), (1432,1432).
T(4,2) = 8: (2134,2134), (2143,2143), (2314,2314), (2314,2413), (2341,2341), (2413,2314), (2413,2413), (2431,2431).
T(4,3) = 8: (3124,3124), (3142,3142), (3142,3241), (3214,3214), (3241,3142), (3241,3241), (3412,3412), (3421,3421).
T(4,4) = 10: (4123,4123), (4132,4132), (4132,4231), (4213,4213), (4213,4312), (4231,4132), (4231,4231), (4312,4213), (4312,4312), (4321,4321).
Triangle T(n,k) begins:
  1
  0,     1;
  0,     1,     1;
  0,     2,     2,     2;
  0,    10,     8,     8,    10;
  0,    88,    68,    64,    68,    88;
  0,  1216,   952,   852,   852,   952,  1216;
  0, 24176, 19312, 17008, 16328, 17008, 19312, 24176;
  ...
		

Crossrefs

Main diagonal and column k=1 give A060350(n-1) for n>0.
Row sums give A262234.
T(2n,n) gives A262379.

Programs

  • Maple
    b:= proc(u, o, h) option remember; `if`(u+o=0, 1,
          add(add(b(u-j, o+j-1, h+i-1), i=1..u+o-h), j=1..u)+
          add(add(b(u+j-1, o-j, h-i), i=1..h), j=1..o))
        end:
    T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), b(k-1, n-k, n-k)):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    b[u_, o_, h_] := b[u, o, h] = If[u + o == 0, 1,
      Sum[b[u - j, o + j - 1, h + i - 1], {i, 1, u + o - h}, {j, 1, u}] +
      Sum[b[u + j - 1, o - j, h - i], {i, 1, h}, {j, 1, o}]];
    T[n_, k_] := If[k == 0, If[n == 0, 1, 0], b[k - 1, n - k, n - k]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 05 2019, after Alois P. Heinz *)