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

A099594 Array read by antidiagonals: poly-Bernoulli numbers B(-k,n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 8, 14, 8, 1, 1, 16, 46, 46, 16, 1, 1, 32, 146, 230, 146, 32, 1, 1, 64, 454, 1066, 1066, 454, 64, 1, 1, 128, 1394, 4718, 6902, 4718, 1394, 128, 1, 1, 256, 4246, 20266, 41506, 41506, 20266, 4246, 256, 1, 1, 512, 12866, 85310, 237686, 329462, 237686, 85310, 12866, 512, 1
Offset: 0

Views

Author

Ralf Stephan, Oct 27 2004

Keywords

Comments

B_n^{(-k)} is the number of distinct n by k "lonesum matrices" where a matrix of entries 0 or 1 is called lonesum when it is uniquely reconstructible from its row and column sums. [Brewbaker]
B_n^{(-k)} is the cardinality of the set { sigma in S_{n+k}: -k <= i-sigma(i) <= n for all i=1,2,...,n+k }. [Launois]
T(n,k) is also the number of permutations on [n+k] in which each substring whose support belongs to {1, 2, ..., n} or {n+1, n+2, ..., n+k} is increasing. For example, with n = 2 and k = 3, the permutation 41532 does not qualify because the substring 53 has support in {n+1, n+2, ..., n+k} = {3,4,5} but is not increasing. T(2,1) = 4 counts 123, 132, 231, 312 while the permutations satisfying Launois' condition above are 123, 132, 213, 231. A bijection between these sets of permutations would be interesting. - David Callan, Jul 22 2008. (Corrected by Norman Do, Sep 01 2008)
T(n,k) is also the number of acyclic orientations of the complete bipartite graph K_{n,k}. - Vincent Pilaud, Sep 15 2020
When indexed as a triangular array, T(n,k) is the number of permutations of [n] in which 1 is in position k and the excedance entries are precisely the entries to the left of 1. See link. - David Callan, Dec 12 2021
T(n,k) is also the number of max-closed relations between an ordered n-element set and an ordered k-element set (see the paper by Jeavons and Cooper 1995). - Don Knuth, Feb 12 2024

Examples

			Square array begins:
  1,  1,   1,    1,     1,      1, ...
  1,  2,   4,    8,    16,     32, ...
  1,  4,  14,   46,   146,    454, ...
  1,  8,  46,  230,  1066,   4718, ...
  1, 16, 146, 1066,  6902,  41506, ...
  1, 32, 454, 4718, 41506, 329462, ...
  ...
		

Crossrefs

Main diagonal is A048163. Another diagonal is A188634.
Antidiagonal sums are in A098830.

Programs

  • Maple
    A:= (n, k)-> add(Stirling2(n+1, i+1)*Stirling2(k+1, i+1)*
                 i!^2, i=0..min(n, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, Jan 02 2016
  • Mathematica
    T[n_, k_] := Sum[(-1)^(j+n)*(1+j)^k*j!*StirlingS2[n, j], {j, 0, n}]; Table[ T[n-k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 30 2016 *)
  • PARI
    T(n,k)=sum(j=0,n,(j+1)^k*sum(i=0,j,(-1)^(n+j-i)*binomial(j,i)*(j-i)^n))
    
  • PARI
    T(n,k)=sum(j=0,min(n,k), j!^2*stirling(n+1, j+1, 2)*stirling(k+1, j+1, 2)); \\ Michel Marcus, Mar 05 2017

Formula

pB(k, n) = (-1)^n * Sum[i=0..n, (-1)^i * i! * Stirling2(n, i) / (i+1)^k ].
E.g.f.: e^(x+y) / [e^x + e^y - e^(x+y)].
T(n, k) = Sum_{j=0..n} (j+1)^k*Sum_{i=0..j} (-1)^(n+j-i)*C(j, i)*(j-i)^n. - Paul D. Hanna, Nov 04 2004
n-th row of the array = row sums of n-th power of triangle A210381. - Gary W. Adamson, Mar 21 2012

A100754 Triangle read by rows: T(n, k) = number of hill-free Dyck paths (i.e., no peaks at height 1) of semilength n and having k peaks.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 8, 8, 1, 1, 13, 29, 13, 1, 1, 19, 73, 73, 19, 1, 1, 26, 151, 266, 151, 26, 1, 1, 34, 276, 749, 749, 276, 34, 1, 1, 43, 463, 1781, 2762, 1781, 463, 43, 1, 1, 53, 729, 3758, 8321, 8321, 3758, 729, 53, 1, 1, 64, 1093, 7253, 21659, 31004, 21659, 7253, 1093, 64, 1
Offset: 2

Views

Author

Emeric Deutsch, Jan 14 2005

Keywords

Comments

Row n has n - 1 terms. Row sums yield the Fine numbers (A000957).
Related to the number of certain sets of non-crossing partitions for the root system A_n (p. 11, Athanasiadis and Savvidou). - Tom Copeland, Oct 19 2014
T(n,k) is the number of permutations pi of [n-1] with k - 1 descents such that s(pi) avoids the patterns 132, 231, and 312, where s is West's stack-sorting map. - Colin Defant, Sep 16 2018
The absolute values of the polynomials at -1 and j (cube root of 1) seem to be given by A126120 and A005043. - F. Chapoton, Nov 16 2021
Don Knuth observes that this sequence also arrises from the enumeration of restricted max-and-min-closed relations, only there it appears as an array read by antidiagonals: see the Knuth "Notes" link and A372068. Knuth also gives a formula expressing the array A372368 in terms of this array. He also reports that there is strong experimental evidence that the n-th term of row m in this array is a polynomial of degree 2*m-2 in n. - N. J. A. Sloane, May 12 2024

Examples

			T(4, 2) = 4 because we have UU*DDUU*DD, UU*DUU*DDD, UUU*DDU*DD and UUU*DU*DDD, where U = (1, 1), D = (1,-1) and * indicates the peaks.
Triangle starts:
   1;
   1,  1;
   1,  4,   1;
   1,  8,   8,    1;
   1, 13,  29,   13,    1;
   1, 19,  73,   73,   19,    1;
   1, 26, 151,  266,  151,   26,    1;
   1, 34, 276,  749,  749,  276,   34,   1;
   1, 43, 463, 1781, 2762, 1781,  463,  43,  1;
   1, 53, 729, 3758, 8321, 8321, 3758, 729, 53, 1;
   ...
As an array (for which the rows of the preceding triangle are the antidiagonals):
   1,  1,    1,     1,      1,      1,       1,        1,        1, ...
   1,  4,    8,    13,     19,     26,      34,       43,       53, ...
   1,  8,   29,    73,    151,    276,     463,      729,     1093, ...
   1, 13,   73,   266,    749,   1781,    3758,     7253,    13061, ...
   1, 19,  151,   749,   2762,   8321,   21659,    50471,   107833, ...
   1, 26,  276,  1781,   8321,  31004,   97754,   271125,   679355, ...
   1, 34,  463,  3758,  21659,  97754,  367285,  1196665,  3478915, ...
   1, 43,  729,  7253,  50471, 271125, 1196665,  4526470, 15118415, ...
   1, 53, 1093, 13061, 107833, 679355, 3478915, 15118415, 57500480, ...
   ...
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> add((j/(n-j))*binomial(n-j, k-j)*binomial(n-j,k), j=0..min(k,n-k)): for n from 2 to 13 do seq(T(n, k), k = 1..n-1) od; # yields the sequence in triangular form
  • Mathematica
    T[n_, k_] := Sum[(j/(n-j))*Binomial[n-j, k-j]*Binomial[n-j, k], {j, 0, Min[k, n-k]}]; Table[T[n, k], {n, 2, 13}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Feb 19 2017, translated from Maple *)

Formula

T(n, k) = Sum_{j=0..min(k, n-k)} (j/(n-j)) * C(n-j, k-j) * C(n-j, k), n >= 2.
G.f.: t*z*r/(1 - t*z*r), where r = r(t, z) is the Narayana function defined by r = z*(1 + r)*(1 + t*r).
From Tom Copeland, Oct 19 2014: (Start)
With offset 0 for A108263 and offset 1 for A132081, row polynomials of this entry P(n, x) = Sum_{i} A108263(n, i)*x^i*(1 + x)^(n - 2*i) = Sum_{i} A132081(n - 2, i)*x^i*(1 + x)^(n - 2*i).
E.g., P(4, x) = 1*x*(1 + x)^(4 - 2*1) + 2*x^2*(1 + x)^(4 - 2*2) = x + 4*x^2 + x^3.
Equivalently, let Q(n, x) be the row polynomials of A108263. Then P(n, x) = (1 + x)^n * Q(n, x/(1 + x)^2).
E.g., P(4, x) = (1 + x)^4 * (x/(1 + x)^2 + 2 * (x/(1 + x)^2)^2).
See Athanasiadis and Savvidou (p. 7). (End)

A272644 Triangle read by rows: T(n,m) = Sum_{i=0..m} Stirling2(m+1,i+1)*(-1)^(m-i)*i^(n-m)*i!, for n >= 2, m = 1..n-1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 13, 13, 1, 1, 29, 73, 29, 1, 1, 61, 301, 301, 61, 1, 1, 125, 1081, 2069, 1081, 125, 1, 1, 253, 3613, 11581, 11581, 3613, 253, 1, 1, 509, 11593, 57749, 95401, 57749, 11593, 509, 1, 1, 1021, 36301, 268381, 673261, 673261, 268381, 36301, 1021, 1
Offset: 2

Views

Author

N. J. A. Sloane, May 07 2016

Keywords

Comments

Gives number of bitriangular permutations. Could be prefixed with row 0 containing a single 1. - N. J. A. Sloane, Jan 10 2018

Examples

			Triangle begins:
n\m  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]
[2]  1;
[3]  1,      1;
[4]  1,      5,      1;
[5]  1,     13,     13,      1;
[6]  1,     29,     73,     29,      1;
[7]  1,     61,    301,    301,     61,      1;
[8]  1,    125,   1081,   2069,   1081,    125,      1;
[9]  1,    253,   3613,  11581,  11581,   3613,    253,      1;
...
		

Crossrefs

Column 2 is A036563.
Largest term in each row gives A272645.
Second diagonal from the right is 2^i - 3.
Third diagonal from the right edge is A006230.
T(2n,n) gives A048144.
For row sums see A297195.

Programs

  • Maple
    A272644 := proc(n,m)
        add(combinat[stirling2](m+1,i+1)*(-1)^(m-i)*i^(n-m)*i!,i=0..m) ;
    end proc:
    seq(seq(A272644(n,m),m=1..n-1),n=2..10) ; # R. J. Mathar, Mar 04 2018
  • Mathematica
    Table[Sum[StirlingS2[m + 1, i + 1] (-1)^(m - i) i^(n - m) i!, {i, 0, m} ], {n, 11}, {m, n - 1}] /. {} -> {0} // Flatten  (* Michael De Vlieger, May 19 2016 *)
  • PARI
    A(n,m) = sum(i=0, m, stirling(m+1, i+1, 2) * (-1)^((m-i)%2) * i^(n - m) * i!);
    concat(vector(10, n, vector(n, m, A(n+1, m))))  \\ Gheorghe Coserea, May 16 2016

Formula

T(n,m) = Sum_{i=0..m} Stirling2(m+1, i+1)*(-1)^(m-i)*i^(n-m)*i!, for n>=2, m=1..n-1, where Stirling2(n,k) is defined by A008277.
A001469(n+1) = Sum_{m=1..2*n-1} (-1)^(m-1)*T(2*n,m). - Gheorghe Coserea, May 18 2016

Extensions

More terms from Gheorghe Coserea, May 16 2016

A372067 Array read by antidiagonals: T(m,n) (m >= 0, n >= 0) = number of connected row convex (CRC) constraints between an m-element set and an n-element set.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 8, 16, 8, 1, 1, 16, 56, 56, 16, 1, 1, 32, 176, 289, 176, 32, 1, 1, 64, 512, 1231, 1231, 512, 64, 1, 1, 128, 1408, 4623, 6655, 4623, 1408, 128, 1, 1, 256, 3712, 15887, 30553, 30553, 15887, 3712, 256, 1, 1, 512, 9472, 51103, 125197, 166186, 125197, 51103, 9472, 512, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2024, based on emails from Don Knuth, May 06 2024 and May 08 2024

Keywords

Comments

See the Knuth "Notes" link for much more information about these sequences. The present sequence is called "table" in Part 1 of the Notes.

Examples

			The initial antidiagonals are:
   1,
   1, 1,
   1, 2, 1,
   1, 4, 4, 1,
   1, 8, 16, 8, 1,
   1, 16, 56, 56, 16, 1,
   1, 32, 176, 289, 176, 32, 1,
   1, 64, 512, 1231, 1231, 512, 64, 1,
   1, 128, 1408, 4623, 6655, 4623, 1408, 128, 1,
   1, 256, 3712, 15887, 30553, 30553, 15887, 3712, 256, 1,
   1, 512, 9472, 51103, 125197, 166186, 125197, 51103, 9472, 512, 1,
   ...
The array begins:
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ...
   1, 4, 16, 56, 176, 512, 1408, 3712, 9472, 23552, ...
   1, 8, 56, 289, 1231, 4623, 15887, 51103, 156159, 457983, ...
   1, 16, 176, 1231, 6655, 30553, 125197, 471581, 1664061, 5572733, ...
   1, 32, 512, 4623, 30553, 166186, 790250, 3402874, 13570090, 50887322, ...
   1, 64, 1408, 15887, 125197, 790250, 4283086, 20750168, 92177312, 382005370, ...
   1, 128, 3712, 51103, 471581, 3402874, 20750168, 111803585,  547505091, 2483709151, ...
   1, 256, 9472, 156159, 1664061, 13570090, 92177312, 547505091, 2932069965, 14453287777, ...
   1, 512, 23552, 457983, 5572733, 50887322, 382005370, 2483709151, 14453287777, 76964939964, ...
   ...
		

References

  • Yves Deville, Olivier Barette, Pascal Van Hentenryck, Constraint satisfaction over connected row-convex constraints, Artificial Intelligence 109 (1999), 243-271.
  • Peter Jeavons, David Cohen, Martin C. Cooper, Constraints, consistency and closure". Artificial Intelligence 101 (1998), 251-265.

Crossrefs

Formula

Knuth gives a formula expressing the current array in terms of the array A372066.

A372068 Array read by antidiagonals: T(m,n) (m >= 0, n >= 0) = number of max-and-min-closed constraints between an m-element set and an n-element set.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 8, 13, 8, 1, 1, 16, 38, 38, 16, 1, 1, 32, 104, 147, 104, 32, 1, 1, 64, 272, 506, 506, 272, 64, 1, 1, 128, 688, 1612, 2103, 1612, 688, 128, 1, 1, 256, 1696, 4856, 7887, 7887, 4856, 1696, 256, 1, 1, 512, 4096, 14016, 27477, 34088, 27477, 14016, 4096, 512, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2024, based on emails from Don Knuth, May 06 2024 and May 08 2024

Keywords

Comments

See the Knuth "Notes" link for much more information about these sequences. The present sequence is called "tab" in Part 2 of the Notes.

Examples

			The initial antidiagonals are:
   1,
   1, 1,
   1, 2, 1,
   1, 4, 4, 1,
   1, 8, 13, 8, 1,
   1, 16, 38, 38, 16, 1,
   1, 32, 104, 147, 104, 32, 1,
   1, 64, 272, 506, 506, 272, 64, 1,
   1, 128, 688, 1612, 2103, 1612, 688, 128, 1,
   1, 256, 1696, 4856, 7887, 7887, 4856, 1696, 256, 1,
   1, 512, 4096, 14016, 27477, 34088, 27477, 14016, 4096, 512, 1,
   ...
The array begins:
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ...
   1, 4, 13, 38, 104, 272, 688, 1696, 4096, 9728, ...
   1, 8, 38, 147, 506, 1612, 4856, 14016, 39104, 106112, ...
   1, 16, 104, 506, 2103, 7887, 27477, 90498, 285072, 865856, ...
   1, 32, 272, 1612, 7887, 34088, 134825, 498465, 1746830, 5859404, ...
   1, 64, 688, 4856, 27477, 134825, 597539, 2451038, 9455182, 34687916, ...
   1, 128, 1696, 14016, 90498, 498465, 2451038, 11055950, 46570858, 185484836, ...
   1, 256, 4096, 39104, 285072, 1746830, 9455182, 46570858, 212833803, 914854829, ...
   1, 512, 9728, 106112, 865856, 5859404, 34687916, 185484836, 914854829, 4223468802, ...
   ...
		

Crossrefs

Showing 1-5 of 5 results.