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.

Showing 1-3 of 3 results.

A126671 Triangle read by rows: row n (n>=0) has g.f. Sum_{i=1..n} n!*x^i*(1+x)^(n-i)/(n+1-i).

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 2, 7, 11, 0, 6, 26, 46, 50, 0, 24, 126, 274, 326, 274, 0, 120, 744, 1956, 2844, 2556, 1764, 0, 720, 5160, 16008, 28092, 30708, 22212, 13068, 0, 5040, 41040, 147120, 304464, 401136, 351504, 212976, 109584, 0, 40320
Offset: 1

Views

Author

N. J. A. Sloane and Carlo Wood (carlo(AT)alinoe.com), Feb 13 2007

Keywords

Comments

The first nonzero column gives the factorial numbers, which are Stirling_1(*,1), the rightmost diagonal gives Stirling_1(*,2), so this triangle may be regarded as interpolating between the first two columns of the Stirling numbers of the first kind.
This is a slice (the right-hand wall) through the infinite square pyramid described in the link. The other three walls give A007318 and A008276 (twice).
The coefficients of the A165674 triangle are generated by the asymptotic expansion of the higher order exponential integral E(x,m=2,n). The a(n) formulas for the coefficients in the right hand columns of this triangle lead to Wiggen's triangle A028421 and their o.g.f.s. lead to the sequence given above. Some right hand columns of the A165674 triangle are A080663, A165676, A165677, A165678 and A165679. - Johannes W. Meijer, Oct 07 2009

Examples

			Triangle begins:
0,
0, 1,
0, 1, 3,
0, 2, 7, 11,
0, 6, 26, 46, 50,
0, 24, 126, 274, 326, 274,
0, 120, 744, 1956, 2844, 2556, 1764,
0, 720, 5160, 16008, 28092, 30708, 22212, 13068,
0, 5040, 41040, 147120, 304464, 401136, 351504, 212976, 109584,
0, 40320, 367920, 1498320, 3582000, 5562576, 5868144, 4292496, 2239344, 1026576, ...
		

Crossrefs

Columns give A000142, A108217, A126672; diagonals give A000254, A067318, A126673. Row sums give A126674. Alternating row sums give A000142.
See A126682 for the full pyramid of coefficients of the underlying polynomials.

Programs

  • Maple
    for n from 1 to 15 do t1:=add( n!*x^i*(1+x)^(n-i)/(n+1-i), i=1..n); series(t1,x,100); lprint(seriestolist(%)); od:
  • Mathematica
    Join[{{0}}, Reap[For[n = 1, n <= 15, n++, t1 = Sum[n!*x^i*(1+x)^(n-i)/(n+1-i), {i, 1, n}]; se = Series[t1, {x, 0, 100}]; Sow[CoefficientList[se, x]]]][[2, 1]]] // Flatten (* Jean-François Alcover, Jan 07 2014, after Maple *)

Formula

Recurrence: T(n,0) = 0; for n>=0, i>=1, T(n+1,i) = (n+1)*T(n,i) + n!*binomial(n,i).
E.g.f.: x*log(1-(1+x)*y)/(x*y-1)/(1+x). - Vladeta Jovovic, Feb 13 2007

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.

A129178 Triangle read by rows: T(n,k) is the number of permutations p of {1,2,...,n} such that invc(p)=k (n >= 0; 0 <= k <= (n-1)(n-2)/2) (see comment for invc definition).

Original entry on oeis.org

1, 1, 2, 4, 2, 8, 8, 6, 2, 16, 24, 28, 26, 16, 8, 2, 32, 64, 96, 120, 126, 110, 82, 52, 26, 10, 2, 64, 160, 288, 432, 564, 658, 680, 638, 542, 416, 284, 172, 90, 38, 12, 2, 128, 384, 800, 1376, 2072, 2824, 3526, 4058, 4344, 4346, 4066, 3562, 2912, 2218, 1566, 1016, 598
Offset: 0

Views

Author

Emeric Deutsch, Apr 11 2007

Keywords

Comments

invc(p) is defined (by Carlitz) in the following way: express p in standard cycle form (i.e., cycles ordered by increasing smallest elements with each cycle written with its smallest element in the first position), then remove the parentheses and count the inversions in the obtained word.
Row n has 1+(n-1)*(n-2)/2 - delta_{0,n} terms. Row sums are the factorials (A000142). T(n,0) = 2^(n-1) = A011782(n) = A000079(n-1). T(n,1) = (n-2)*2^(n-2) = A036289(n-2) for n>=2. T(n,k) = A121552(n,n+k).
It appears that Sum_{k>=0} k*T(n,k) = A126673(n).

Examples

			T(3,0)=4, T(3,1)=2 because we have 123=(1)(2)(3), 132=(1)(23), 213=(12)(3), 231=(123) with the resulting word (namely 123) having 0 inversions and 312=(132) and (321)=(13)(2) with the resulting word (namely 132) having 1 inversion.
Triangle starts:
   1;
   1;
   2;
   4,   2;
   8,   8,   6,   2;
  16,  24,  28,  26,  16,   8,   2;
  32,  64,  96, 120, 126, 110,  82,  52,  26,  10,  2;
  ...
		

References

  • L. Carlitz, Generalized Stirling numbers, Combinatorial Analysis Notes, Duke University, 1968, 1-7.

Crossrefs

Programs

  • Maple
    s:=j->2+sum(t^i, i=1..j): for n from 0 to 9 do P[n]:=sort(expand(simplify(product(s(j), j=0..n-2)))) od: for n from 0 to 9 do seq(coeff(P[n], t, j), j=0..degree(P[n])) od;  # yields sequence in triangular form
  • Mathematica
    nMax = 9; s[j_] := 2 + Sum[t^i, {i, 1, j}]; P[0] = P[1] = 1; P[2] = 2; For[ n = 3, n <= nMax, n++, P[n] = Sort[Expand[Simplify[Product[s[j], {j, 0, n-2}]]]]]; Table[Coefficient[P[n], t, j], {n, 0, nMax}, {j, 0, Exponent[ P[n], t]}] // Flatten (* Jean-François Alcover, Jan 24 2017, adapted from Maple *)

Formula

Generating polynomial of row n is P[n](t) = 2*(2+t)*(2+t+t^2)*...*(2 + t + t^2 + ... + t^(n-2)) for n >= 3, P[1](t)=1, P[2](t)=2.

Extensions

One term for row n=0 prepended by Alois P. Heinz, Dec 16 2016
Showing 1-3 of 3 results.