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.

A092580 Triangle read by rows: T(n,k) is the number of permutations p of [n] in which exactly the first k terms satisfy the up-down property, i.e., p(1)p(3), p(3)

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 12, 4, 3, 5, 60, 20, 15, 9, 16, 360, 120, 90, 54, 35, 61, 2520, 840, 630, 378, 245, 155, 272, 20160, 6720, 5040, 3024, 1960, 1240, 791, 1385, 181440, 60480, 45360, 27216, 17640, 11160, 7119, 4529, 7936, 1814400, 604800, 453600, 272160, 176400, 111600, 71190, 45290, 28839, 50521
Offset: 1

Views

Author

Emeric Deutsch and Warren P. Johnson (wjohnson(AT)bates.edu), Apr 10 2004

Keywords

Comments

Row sums are the factorial numbers (A000142). First column is A001710. Second column is A001715. Diagonal is A000111.

Examples

			T(4,3)=3 because 1432, 2431, 3421 are the only permutations of [4] in which exactly the first 3 entries satisfy the up-down property.
Triangle starts:
    1;
    1,   1;
    3,   1,  2;
   12,   4,  3,  5;
   60,  20, 15,  9, 16;
  360, 120, 90, 54, 35, 61;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    E:= n-> b(n, 0):
    T:= (n, k)-> `if`(n=k, E(n), n!*((k+1)*E(k)-E(k+1))/(k+1)!):
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Aug 12 2016
  • Mathematica
    b[u_, o_] := b[u, o] = If[u + o == 0, 1, Sum[b[o - 1 + j, u - j], {j, 1, u}]]; e[n_] := b[n, 0]; T[n_, k_] := If[n == k, e[n], n!*((k + 1)*e[k] - e[k + 1])/(k + 1)!]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)

Formula

T(n, k) = n!*[(k+1)*E(k)-E(k+1)]/(k+1)! for k=0} [E(n)x^n/n!] (i.e., E(n) = A000111(n)).
Sum_{k=0..n} (k+1) * T(n,k) = A230960(n). - Alois P. Heinz, Apr 27 2023