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-4 of 4 results.

A238123 Triangle read by rows: T(n,k) gives the number of ballot sequences of length n having k largest parts, n >= k >= 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 7, 2, 0, 1, 0, 20, 5, 0, 0, 1, 0, 56, 14, 5, 0, 0, 1, 0, 182, 35, 14, 0, 0, 0, 1, 0, 589, 132, 28, 14, 0, 0, 0, 1, 0, 2088, 399, 90, 42, 0, 0, 0, 0, 1, 0, 7522, 1556, 285, 90, 42, 0, 0, 0, 0, 1, 0, 28820, 5346, 1232, 165, 132, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 21 2014

Keywords

Comments

Also number of standard Young tableaux with last row of length k.

Examples

			Triangle starts:
00: 1;
01: 0,      1;
02: 0,      1,     1;
03, 0,      3,     0,     1;
04: 0,      7,     2,     0,    1;
05: 0,     20,     5,     0,    0,   1;
06: 0,     56,    14,     5,    0,   0,   1;
07: 0,    182,    35,    14,    0,   0,   0, 1;
08: 0,    589,   132,    28,   14,   0,   0, 0, 1;
09: 0,   2088,   399,    90,   42,   0,   0, 0, 0, 1;
10: 0,   7522,  1556,   285,   90,  42,   0, 0, 0, 0, 1;
11: 0,  28820,  5346,  1232,  165, 132,   0, 0, 0, 0, 0, 1;
12: 0, 113092, 21515,  4378,  737, 297, 132, 0, 0, 0, 0, 0, 1;
13: 0, 464477, 82940, 17082, 3003, 572, 429, 0, 0, 0, 0, 0, 0, 1;
...
The T(6,2)=14 ballot sequences of length 6 with 2 maximal elements are (dots for zeros):
01:  [ . . . . 1 1 ]
02:  [ . . . 1 . 1 ]
03:  [ . . . 1 1 . ]
04:  [ . . 1 . . 1 ]
05:  [ . . 1 . 1 . ]
06:  [ . . 1 1 . . ]
07:  [ . . 1 1 2 2 ]
08:  [ . . 1 2 1 2 ]
09:  [ . 1 . . . 1 ]
10:  [ . 1 . . 1 . ]
11:  [ . 1 . 1 . . ]
12:  [ . 1 . 1 2 2 ]
13:  [ . 1 . 2 1 2 ]
14:  [ . 1 2 . 1 2 ]
The T(8,4)=14 such ballot sequences of length 8 and 4 maximal elements are:
01:  [ . . . . 1 1 1 1 ]
02:  [ . . . 1 . 1 1 1 ]
03:  [ . . . 1 1 . 1 1 ]
04:  [ . . . 1 1 1 . 1 ]
05:  [ . . 1 . . 1 1 1 ]
06:  [ . . 1 . 1 . 1 1 ]
07:  [ . . 1 . 1 1 . 1 ]
08:  [ . . 1 1 . . 1 1 ]
09:  [ . . 1 1 . 1 . 1 ]
10:  [ . 1 . . . 1 1 1 ]
11:  [ . 1 . . 1 . 1 1 ]
12:  [ . 1 . . 1 1 . 1 ]
13:  [ . 1 . 1 . . 1 1 ]
14:  [ . 1 . 1 . 1 . 1 ]
These are the (reversed) Dyck words of semi-length 4.
		

Crossrefs

The terms T(2*n,n) are the Catalan numbers (A000108).
Row sums give A000085.
Cf. A026794.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n<1, x^l[-1],
          b(n-1, [l[], 1]) +add(`if`(i=1 or l[i-1]>l[i],
          b(n-1, subsop(i=l[i]+1, l)), 0), i=1..nops(l)))
        end:
    T:= n->`if`(n=0, 1, (p->seq(coeff(p, x, i), i=0..n))(b(n-1, [1]))):
    seq(T(n), n=0..12);
    # second Maple program (counting SYT):
    h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
           add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= proc(n, i, l) `if`(n=0 or i=1, h([l[], 1$n])*x^`if`(n>0, 1,
           `if`(l=[], 0, l[-1])), g(n, i-1, l)+
           `if`(i>n, 0, g(n-i, i, [l[], i])))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(g(n, n, [])):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, l_List] :=  b[n, l] = If[n<1, x^l[[-1]], b[n-1, Append[l, 1]] +  Sum[If[i == 1 || l[[i-1]] > l[[i]], b[n-1, ReplacePart[l, i -> l[[i]] + 1]], 0], {i, 1, Length[l]}]]; T[n_] := If[n == 0, 1, Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n-1, {1}]]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 07 2015, translated from Maple *)
  • PARI
    (A238123(n,k)=if(k, vecsum(apply(p->n!/Hook(Vecrev(p)), select(p->p[1]==k,partitions(n,[k,n])))), !n)); Hook(P,h=vector(P[1]),L=P[#P])={prod(i=1, L, h[i]=L-i+1)*prod(i=1,#P-1, my(D=-L+L=P[#P-i]); prod(k=0,L-1,h[L-k]+=min(k,D)+1))} \\  M. F. Hasler, Jun 03 2018

A238750 Number T(n,k) of standard Young tableaux with n cells and largest value n in row k; 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, 1, 1, 0, 4, 3, 2, 1, 0, 10, 7, 5, 3, 1, 0, 26, 20, 14, 11, 4, 1, 0, 76, 56, 44, 31, 19, 5, 1, 0, 232, 182, 139, 106, 69, 29, 6, 1, 0, 764, 589, 475, 351, 265, 127, 41, 7, 1, 0, 2620, 2088, 1658, 1303, 971, 583, 209, 55, 8, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 04 2014

Keywords

Comments

Also the number of ballot sequences of length n having last value k.
Also the number of standard Young tableaux with n cells where the row containing the largest value n has length k.
Also the number of ballot sequences of length n where the last value has multiplicity k.
T(0,0) = 1 by convention.
Columns k=0-2 give: A000007, A000085(n-1), A238124(n-1).
T(2n,n) gives A246731.
Row sums give A000085.

Examples

			The 10 tableaux with n=4 cells sorted by the number of the row containing the largest value 4 are:
:[1 4] [1 2 4] [1 3 4] [1 2 3 4]:[1 2] [1 3] [1 2 3]:[1 2] [1 3]:[1]:
:[2]   [3]     [2]              :[3 4] [2 4] [4]    :[3]   [2]  :[2]:
:[3]                            :                   :[4]   [4]  :[3]:
:                               :                   :           :[4]:
: --------------1-------------- : --------2-------- : ----3---- : 4 :
Their corresponding ballot sequences are: [1,2,3,1], [1,1,2,1], [1,2,1,1], [1,1,1,1], [1,1,2,2], [1,2,1,2], [1,1,1,2], [1,1,2,3], [1,2,1,3], [1,2,3,4].  Thus row 4 = [0, 4, 3, 2, 1].
Triangle T(n,k) begins:
00:   1;
01:   0,    1;
02:   0,    1,    1;
03:   0,    2,    1,    1;
04:   0,    4,    3,    2,    1;
05:   0,   10,    7,    5,    3,   1;
06:   0,   26,   20,   14,   11,   4,   1;
07:   0,   76,   56,   44,   31,  19,   5,   1;
08:   0,  232,  182,  139,  106,  69,  29,   6,  1;
09:   0,  764,  589,  475,  351, 265, 127,  41,  7,  1;
10:   0, 2620, 2088, 1658, 1303, 971, 583, 209, 55,  8,  1;
		

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
          add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n) end:
    g:= proc(l) local n; n:=nops(l); `if`(n=0, 1, add(
         `if`(i=n or l[i]>l[i+1], x^i *h(subsop(i=
         `if`(i=n and l[n]=1, NULL, l[i]-1), l)), 0), i=1..n))
        end:
    b:= (n, i, l)-> `if`(n=0 or i=1, g([l[], 1$n]),
         add(b(n-i*j, i-1, [l[], i$j]), j=0..n/i)):
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, n, [])):
    seq(T(n), n=0..12);
  • Mathematica
    h[l_] := With[{n = Length[l]}, Total[l]!/Product[Product[1+l[[i]]-j+
         Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, l[[i]]}], {i, n}]];
    g[l_] := With[{ n = Length[l]}, If[n == 0, 1, Sum[
         If[i == n || l[[i]] > l[[i + 1]], x^i *h[ReplacePart[l, i ->
         If[i == n && l[[n]] == 1, Nothing, l[[i]] - 1]]], 0], {i, n}]]];
    b[n_, i_, l_] := If[n == 0 || i == 1, g[Join[l, Table[1, {n}]]],
         Sum[b[n - i*j, i - 1, Join[l, Table[i, {j}]]], {j, 0, n/i}]];
    T[n_] := CoefficientList[b[n, n, {}], x];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Aug 27 2021, after Maple code *)

A369588 Triangular array read by rows: T(m,n) = number of Yamanouchi words of length m that start with n, m >= 1, n = 1..m.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 3, 2, 1, 10, 7, 5, 3, 1, 26, 20, 14, 11, 4, 1, 76, 56, 44, 31, 19, 5, 1, 232, 182, 139, 106, 69, 29, 6, 1, 764, 589, 475, 351, 265, 127, 41, 7, 1, 2620, 2088, 1658, 1303, 971, 583, 209, 55, 8, 1, 9496, 7522, 6146, 4846, 3734, 2446, 1106, 319, 71, 9, 1, 35696, 28820, 23495, 19108, 14629, 10616, 5323, 1904, 461, 89, 10, 1
Offset: 1

Views

Author

Max Alekseyev, Jan 26 2024

Keywords

Examples

			Array starts with
  m=1:  1
  m=2:  1,  1
  m=3:  2,  1,  1
  m=4:  4,  3,  2,  1
  m=5: 10,  7,  5,  3,  1
  m=6: 26, 20, 14, 11,  4, 1
  m=7: 76, 56, 44, 31, 19, 5, 1
		

Crossrefs

Sum in the m-th row equals T(m+1,1) = A000085(m).
Columns: A000085 (n=1), A238124 (n=2), A369590 (n=3).
Cf. A369589.

A369590 a(n) = number of Yamanouchi words of length n that start with 3.

Original entry on oeis.org

0, 0, 1, 2, 5, 14, 44, 139, 475, 1658, 6146, 23495, 93840, 385956, 1643862, 7193783, 32446635, 150049734, 712619582, 3462870079
Offset: 1

Views

Author

Max Alekseyev, Jan 26 2024

Keywords

Crossrefs

Column 3 in A369588.
Showing 1-4 of 4 results.