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.

A381529 T(n,k) is the number of permutations of [n] having exactly k pairs of integers i=0, 0<=k<=A125811(n)-1, read by rows.

Original entry on oeis.org

1, 1, 2, 5, 1, 15, 5, 4, 54, 21, 24, 16, 5, 235, 89, 118, 112, 101, 35, 28, 2, 1237, 408, 577, 633, 719, 585, 402, 239, 167, 59, 14, 7790, 2106, 3023, 3529, 4410, 4463, 4600, 3012, 2789, 1933, 1438, 629, 442, 122, 34, 57581, 12529, 17693, 20980, 27208, 30064, 35359, 33332, 28137, 24970, 22850, 17148, 14272, 8645, 5639, 3684, 1809, 664, 282, 34
Offset: 0

Views

Author

Alois P. Heinz, Feb 26 2025

Keywords

Examples

			T(4,0) = 15: (1)(2)(3)(4), (1,2)(3)(4), (1)(2,3)(4), (1)(2)(3,4), (1,2)(3,4), (1,2,3)(4), (1,3,2)(4), (1)(2,3,4), (1)(2,4,3), (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,3,4,2), (1,4,2,3), (1,4,3,2).
T(4,1) = 5: (1)(2,4)(3), (1,2,4)(3), (1,4,2)(3), (1,3)(2)(4), (1,3)(2,4).
T(4,2) = 4: (1,4)(2)(3), (1,4)(2,3), (1,3,4)(2), (1,4,3)(2).
Triangle T(n,k) begins:
     1;
     1;
     2;
     5,   1;
    15,   5,   4;
    54,  21,  24,  16,   5;
   235,  89, 118, 112, 101,  35,  28,   2;
  1237, 408, 577, 633, 719, 585, 402, 239, 167, 59, 14;
  ...
		

Crossrefs

Columns k=0-1 give: A051295, A381539.
Row sums give A000142.
Row lengths give A125811.
Last elements of rows give A381531.
Main diagonal gives A381545.
Cf. A008302, A125810 (similar for set partitions), A126673, A381299 (similar for ordered set partitions).

Programs

  • Maple
    b:= proc(o, u, t) option remember; expand(`if`(u+o=0, max(0, t-1)!,
         `if`(t>0, b(u+o, 0$2)*(t-1)!, 0)+add(x^(u+j-1)*
            b(o-j, u+j-1, t+1), j=`if`(t=0, 1, 1..o))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..10);

Formula

Sum_{k>=1} k * T(n,k) = A126673(n)/2.