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

A238125 Triangle read by rows: T(n,k) gives the number of ballot sequences of length n having exactly k flat steps, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 4, 3, 2, 1, 0, 9, 8, 6, 2, 1, 0, 22, 24, 17, 9, 3, 1, 0, 59, 70, 57, 29, 13, 3, 1, 0, 170, 224, 191, 108, 49, 17, 4, 1, 0, 516, 744, 663, 399, 201, 69, 23, 4, 1, 0, 1658, 2588, 2415, 1573, 802, 322, 104, 28, 5, 1, 0, 5583, 9317, 9108, 6249, 3343, 1408, 510, 137, 35, 5, 1, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 21 2014

Keywords

Comments

Also number of standard Young tableaux with n cells and exactly k successions. A succession is a pair of cells (v, v+1) lying in the same row.
T(2n,n) gives A241785.
Row sums are A000085.

Examples

			Triangle starts:
00:     1;
01:     1,     0;
02:     1,     1,     0;
03:     2,     1,     1,     0;
04:     4,     3,     2,     1,     0;
05:     9,     8,     6,     2,     1,    0;
06:    22,    24,    17,     9,     3,    1,    0;
07:    59,    70,    57,    29,    13,    3,    1,   0;
08:   170,   224,   191,   108,    49,   17,    4,   1,   0;
09:   516,   744,   663,   399,   201,   69,   23,   4,   1,  0;
10:  1658,  2588,  2415,  1573,   802,  322,  104,  28,   5,  1, 0;
11:  5583,  9317,  9108,  6249,  3343, 1408,  510, 137,  35,  5, 1, 0;
12: 19683, 34924, 35695, 25642, 14368, 6440, 2411, 751, 189, 42, 6, 1, 0;
...
		

Programs

  • Maple
    b:= proc(n, v, l) option remember; `if`(n<1, 1, expand(
          add(`if`(i=1 or l[i-1]>l[i], `if`(i=v, x, 1)*
          b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+
          b(n-1, nops(l)+1, [l[], 1])))
        end:
    T:= n-> seq(coeff(b(n-1, 1, [1]), x, i), i=0..n):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, v_, l_List] := b[n, v, l] = If[n<1, 1, Sum[If[i == 1 || l[[i-1]] > l[[i]], If[i == v, x, 1]*b[n-1, i, ReplacePart[l, i -> l[[i]]+1]], 0], {i, 1, Length[l]}] + b[n-1, Length[l]+1, Append[l, 1]]]; T[n_] := Table[Coefficient[b[n-1, 1, {1}], x, i], {i, 0, n}]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 07 2015, translated from Maple *)

A214087 Sum of the squares of numbers of nonconsecutive tableaux over all partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 6, 21, 92, 489, 3000, 20970, 166714, 1467337, 14212491, 149992662, 1723338952, 21393028409, 285061374438, 4054622024814, 61301381208116, 982904573560309, 16672187358390360, 298389960090957330, 5617735345244596804, 110942937545014894799
Offset: 0

Views

Author

Alois P. Heinz, Jul 02 2012

Keywords

Comments

A standard Young tableau (SYT) where entries i and i+1 never appear in the same row is called a nonconsecutive tableau.

Crossrefs

Programs

  • Maple
    b:= proc(l, t) option remember; local n, s; n, s:= nops(l),
           add(i, i=l); `if`(s=0, 1, add(`if`(t<>i and l[i]>
          `if`(i=n, 0, l[i+1]), b(subsop(i=l[i]-1, l), i), 0), i=1..n))
        end:
    g:= (n, i, l)-> `if`(n=0 or i=1, b([l[], 1$n], 0)^2, `if`(i<1, 0,
                     add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):
    a:= n-> `if`(n<2, 1, g(n, n, [])):
    seq(a(n), n=0..20);
  • Mathematica
    b[l_, t_] := b[l, t] = Module[{n = Length[l], s = Total[l]}, If[s == 0, 1, Sum[If[t != i && l[[i]] > If[i == n, 0, l[[i + 1]]], b[ReplacePart[l, i -> l[[i]] - 1], i], 0], {i, 1, n}]]];
    g[n_, i_, l_] := If[n == 0 || i == 1, b[Join[l, Table[1, n]], 0]^2, If[i < 1, 0, Sum[g[n - i*j, i - 1, Join[l, Table[i, j]]], {j, 0, n/i}]]];
    a[n_] := If[n < 2, 1, g[n, n, {}]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 23 2018, translated from Maple *)

A238020 Number of nonconsecutive chess tableaux with n cells.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 5, 10, 15, 33, 52, 126, 213, 537, 991, 2563, 5118, 13670, 29171, 81069, 180813, 525755, 1216996, 3693934, 8843831, 27797975, 69106326, 223116931, 577433770, 1903516721, 5136516772, 17257698892, 48388514996, 166022450140, 481137194184
Offset: 0

Views

Author

Alois P. Heinz, Feb 17 2014

Keywords

Comments

A standard Young tableau (SYT) with cell(i,j)+i+j == 1 mod 2 for all cells where entries m and m+1 never appear in the same row is called a nonconsecutive chess tableau.

Examples

			a(6) = 4:
[1]   [1 6]   [1 4]   [1 4]
[2]   [2]     [2 5]   [2 5]
[3]   [3]     [3]     [3 6]
[4]   [4]     [6]
[5]   [5]
[6]
		

Crossrefs

Programs

  • Maple
    b:= proc(l, t) option remember; local n, s;
          n, s:= nops(l), add(i, i=l); `if`(s=0, 1, add(`if`(t<>i and
          irem(s+i-l[i], 2)=1 and l[i]>`if`(i=n, 0, l[i+1]), b(subsop(
          i=`if`(i=n and l[n]=1, [][], l[i]-1), l), i), 0), i=1..n))
        end:
    g:= (n, i, l)-> `if`(n=0 or i=1, b([l[], 1$n], 0), `if`(i<1, 0,
                     add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):
    a:= n-> g(n, n, []):
    seq(a(n), n=0..32);
  • Mathematica
    b[l_, t_] := b[l, t] = Module[{ n = Length[l], s = Total[l]}, If[s == 0, 1, Sum[If[t != i && Mod[s + i - l[[i]], 2] == 1 && l[[i]] > If[i == n, 0, l[[i + 1]]], b[ReplacePart[l, i -> If[i == n && l[[n]] == 1, Nothing, l[[i]] - 1]], i], 0], {i, 1, n}]]];
    g[n_, i_, l_] := If[n == 0 || i == 1, b[Join[l, Table[1, n]], 0], If[i < 1, 0, Sum[g[n - i*j, i - 1, Join[l, Table[i, j]]], {j, 0, n/i}]]];
    a[n_] := g[n, n, {}];
    Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Nov 08 2017, after Alois P. Heinz *)

A238126 Number of standard Young tableaux with n cells and exactly one succession.

Original entry on oeis.org

0, 0, 1, 1, 3, 8, 24, 70, 224, 744, 2588, 9317, 34924, 135297, 542123, 2236834, 9508297, 41511215, 186109781, 854874944, 4021672983, 19344343843, 95093249014, 477137036748, 2442413708120, 12742038926613, 67714763161526, 366266085720565, 2015454903261855
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 21 2014

Keywords

Comments

A succession is a pair of cells (v, v+1) lying in the same row.
Also number of ballot sequences having one flat step.
Second column (k=1) of A238125.

Crossrefs

Cf. A237770 (no successions), A238127 (two successions).

A238127 Number of standard Young tableaux with n cells and exactly two successions.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 17, 57, 191, 663, 2415, 9108, 35695, 143989, 599802, 2566917, 11298164, 50967216, 235745644, 1115324000, 5397332497, 26669487517, 134528555379, 691856601631, 3626390958551, 19353306241764, 105122093620388, 580689432523534, 3260906342453966
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 21 2014

Keywords

Comments

A succession is a pair of cells (v, v+1) lying in the same row.
Also number of ballot sequences having two flat steps.
Third column (k=2) of A238125.

Crossrefs

Cf. A237770 (no successions), A238126 (one succession).

A264051 Triangle read by rows: T(n,k) (n>=0, 0<=k<=A264078(n)) is the number of integer partitions of n having k standard Young tableaux such that no entries i and i+1 appear in the same row.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 0, 2, 4, 2, 1, 1, 1, 1, 1, 4, 3, 1, 0, 0, 2, 2, 0, 1, 0, 1, 0, 0, 0, 1, 7, 2, 0, 0, 1, 0, 3, 0, 1, 0, 2, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 7, 3, 1, 2, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1
Offset: 0

Views

Author

Christian Stump, Nov 01 2015

Keywords

Comments

Row sums give A000041.
Column k=0 gives A025065(n-2) for n>=2.

Examples

			Triangle begins:
0,1,
0,1,
1,1,
1,2,
2,2,1,
2,3,0,2,
4,2,1,1,1,1,1,
4,3,1,0,0,2,2,0,1,0,1,0,0,0,1,
7,2,0,0,1,0,3,0,1,0,2,1,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,
...
		

Crossrefs

Programs

  • Maple
    h:= proc(l, j) option remember; `if`(l=[], 1,
          `if`(l[1]=0, h(subsop(1=[][], l), j-1), add(
          `if`(i<>j and l[i]>0 and (i=1 or l[i]>l[i-1]),
           h(subsop(i=l[i]-1, l), i), 0), i=1..nops(l))))
        end:
    g:= proc(n, i, l) `if`(n=0 or i=1, x^h([1$n, l[]], 0),
          `if`(i<1, 0, g(n, i-1, l)+ `if`(i>n, 0,
           g(n-i, i, [i, l[]]))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(g(n$2, [])):
    seq(T(n), n=0..10);  # Alois P. Heinz, Nov 02 2015
  • Mathematica
    h[l_, j_] := h[l, j] = If[l == {}, 1, If[l[[1]] == 0, h[ReplacePart[l, 1 -> Sequence[]], j - 1], Sum[If[i != j && l[[i]] > 0 && (i == 1 || l[[i]] > l[[i - 1]]), h[ReplacePart[l, i -> l[[i]] - 1], i], 0], {i, 1, Length[l]} ]]]; g[n_, i_, l_] := If[n == 0 || i == 1, x^h[Join[Array[1 &, n], l], 0], If[i < 1, 0, g[n, i - 1, l] + If[i > n, 0, g[n - i, i, Join[{i}, l]]] ]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][g[n, n, {}]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 22 2016, after Alois P. Heinz *)

Formula

Sum_{k=1..A264078(n)} k*T(n,k) = A237770(n). - Alois P. Heinz, Nov 02 2015

A264078 The maximal number of standard Young tableaux without a succession v, v+1 in a row that a single partition of n can have.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 14, 30, 76, 170, 553, 1583, 5106, 14090, 41002, 164769, 603513, 2418348, 8335804, 28704417, 109618261, 466318442, 2114095511, 10276979159, 43213859606, 175668903294, 793946150358, 3490939879402, 15500974371599, 82490059523125
Offset: 0

Views

Author

Alois P. Heinz, Nov 02 2015

Keywords

Comments

A standard Young tableau (SYT) without a succession v, v+1 in a row is called a nonconsecutive tableau.

Examples

			a(6) = 6: partition [2,2,1,1] has 6 standard Young tableaux without a succession v, v+1 in a row, which is maximal for a partition of n=6:
15   14   14   13   13   13
26   26   25   26   25   24
3    3    3    4    4    5
4    5    6    5    6    6
		

Crossrefs

Programs

  • Maple
    h:= proc(l, j) option remember; `if`(l=[], 1,
          `if`(l[1]=0, h(subsop(1=[][], l), j-1), add(
          `if`(i<>j and l[i]>0 and (i=1 or l[i]>l[i-1]),
           h(subsop(i=l[i]-1, l), i), 0), i=1..nops(l))))
        end:
    g:= proc(n, i, l) `if`(n=0 or i=1, h([1$n, l[]], 0),
          `if`(i<1, 0, max(g(n, i-1, l),
          `if`(i>n, 0, g(n-i, i, [i, l[]])))))
        end:
    a:= n-> g(n$2, []):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 02 2015
  • Mathematica
    h[l_, j_] := h[l, j] = If[l == {}, 1, If[l[[1]] == 0, h[ReplacePart[l, 1 -> Sequence[]], j - 1], Sum[If[i != j && l[[i]] > 0 && (i == 1 || l[[i]] > l[[i - 1]]), h[ReplacePart[l, i -> l[[i]] - 1], i], 0], {i, 1, Length[l]} ]]]; g[n_, i_, l_] := g[n, i, l] = If[n == 0 || i == 1, h[Join[Array[1 &, n], l], 0], If[i < 1, 0, Max[g[n, i - 1, l], If[i > n, 0, g[n - i, i, Join[{i}, l]]]]]]; a[n_] := g[n, n, {}];  Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 22 2016, after Alois P. Heinz *)

Formula

a(n) = max { k : A264051(n,k) > 0 }.

A238014 Number of chess tableaux with n cells.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 12, 20, 48, 84, 216, 408, 1104, 2280, 6288, 14128, 40256, 96240, 287904, 714016, 2246592, 5750112, 18900672, 49973568, 169592576, 466175808, 1618212224, 4637091200, 16393123072, 48926588544, 176264622336, 545058738944, 2008508679168
Offset: 0

Views

Author

Alois P. Heinz, Feb 17 2014

Keywords

Comments

A standard Young tableau (SYT) with cell(i,j) + i + j == 1 mod 2 for all cells is called a chess tableau. In other words, the odd numbered cells appear in the first, third, fifth, etc., skew diagonal, and the even numbered cells appear in the second, fourth, sixth, etc., skew diagonal. The definition appears first in the article by Jonas Sjöstrand.
All terms for n>=2 are even, as the conjugate of each chess tableau is a different chess tableau for n>=2.
Number of ballot sequences (with least element and first index either both 0 or both 1) with index of first occurrence of each element e of same parity as e, and identical elements separated by an even number of different elements, see example. [Joerg Arndt, Feb 28 2014]

Examples

			a(5) = 6:
[1]  [1 4]  [1 2 3]  [1 4 5]  [1 2 3]  [1 2 3 4 5]
[2]  [2 5]  [4]      [2]      [4 5]
[3]  [3]    [5]      [3]
[4]
[5]
Note how the tableaux become partial chessboards when reduced modulo 2:
[1]  [1 0]  [1 0 1]  [1 0 1]  [1 0 1]  [1 0 1 0 1]
[0]  [0 1]  [0]      [0]      [0 1]
[1]  [1]    [1]      [1]
[0]
[1]
From _Joerg Arndt_, Feb 28 2014: (Start)
The a(7) = 20 ballot sequences are (dots for zeros):
01:    [ . . . . . . . ]
02:    [ . . . . . 1 1 ]
03:    [ . . . . . 1 2 ]
04:    [ . . . 1 1 . . ]
05:    [ . . . 1 1 . 2 ]
06:    [ . . . 1 1 1 2 ]
07:    [ . . . 1 2 . . ]
08:    [ . . . 1 2 . 1 ]
09:    [ . . . 1 2 3 1 ]
10:    [ . . . 1 2 3 4 ]
11:    [ . 1 2 . . . . ]
12:    [ . 1 2 . . . 1 ]
13:    [ . 1 2 . . 3 1 ]
14:    [ . 1 2 . . 3 4 ]
15:    [ . 1 2 . 1 2 . ]
16:    [ . 1 2 . 1 3 . ]
17:    [ . 1 2 . 1 3 4 ]
18:    [ . 1 2 3 4 . . ]
19:    [ . 1 2 3 4 . 1 ]
20:    [ . 1 2 3 4 5 6 ]
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc() option remember; local s; s:= add(i, i=args); `if`(s=0, 1,
          `if`(args[nargs]=0, b(subsop(nargs=NULL, [args])[]),
          add(`if`(irem(s+i-args[i], 2)=1 and args[i]>`if`(i=nargs, 0,
          args[i+1]), b(subsop(i=args[i]-1, [args])[]), 0), i=1..nargs)))
        end:
    g:= (n, i, l)-> `if`(n=0 or i=1, b(l[], 1$n), `if`(i<1, 0,
                     add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):
    a:= n-> g(n, n, []):
    seq(a(n), n=0..32);
  • Mathematica
    b[args_] := b[args] = Module[{nargs = Length[args], s = Total[args]}, If[s == 0, 1, If[Last[args] == 0, b[Most[args]], Sum[If[Mod[s + i - args[[i]], 2] == 1 && args[[i]] > If[i == nargs, 0, args[[i + 1]]], b[Append[ ReplacePart[ args, i -> args[[i]] - 1], 0]], 0], {i, 1, nargs}]]]];
    g[n_, i_, l_] := g[n, i, l] = If[n == 0 || i == 1, b[Join[l, Table[1, n]]], If[i < 1, 0, Sum[g[n - i*j, i - 1, Join[l, Table[i, j]]], {j, 0, n/i}]]];
    a[n_] := g[n, n, {}];
    Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Nov 14 2017, after Alois P. Heinz *)

Formula

a(n) = Sum_{lambda : partitions(n)} chess(lambda), where chess(lambda) is the number of chess tableaux of shape lambda.
Showing 1-8 of 8 results.