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.

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

A267383 Number A(n,k) of acyclic orientations of the Turán graph T(n,k); square array A(n,k), n>=0, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 6, 14, 1, 1, 1, 2, 6, 18, 46, 1, 1, 1, 2, 6, 24, 78, 230, 1, 1, 1, 2, 6, 24, 96, 426, 1066, 1, 1, 1, 2, 6, 24, 120, 504, 2286, 6902, 1, 1, 1, 2, 6, 24, 120, 600, 3216, 15402, 41506, 1
Offset: 0

Views

Author

Alois P. Heinz, Jan 13 2016

Keywords

Comments

An acyclic orientation is an assignment of a direction to each edge such that no cycle in the graph is consistently oriented. Stanley showed that the number of acyclic orientations of a graph G is equal to the absolute value of the chromatic polynomial X_G(q) evaluated at q=-1.
Conjecture: In general, column k > 1 is asymptotic to n! / ((k-1) * (1 - log(k/(k-1)))^((k-1)/2) * k^n * (log(k/(k-1)))^(n+1)). - Vaclav Kotesovec, Feb 18 2017

Examples

			Square array A(n,k) begins:
  1,    1,    1,    1,    1,    1,    1, ...
  1,    1,    1,    1,    1,    1,    1, ...
  1,    2,    2,    2,    2,    2,    2, ...
  1,    4,    6,    6,    6,    6,    6, ...
  1,   14,   18,   24,   24,   24,   24, ...
  1,   46,   78,   96,  120,  120,  120, ...
  1,  230,  426,  504,  600,  720,  720, ...
  1, 1066, 2286, 3216, 3720, 4320, 5040, ...
		

Crossrefs

Main diagonal gives A000142.
A(2n,n) gives A033815.
A(n,ceiling(n/2)) gives A161132.
Bisection of column k=2 gives A048163.
Trisection of column k=3 gives A370961.
a(n^2,n) gives A372084.

Programs

  • Maple
    A:= proc(n, k) option remember; local b, l, q; q:=-1;
           l:= [floor(n/k)$(k-irem(n,k)), ceil(n/k)$irem(n,k)];
           b:= proc(n, j) option remember; `if`(j=1, (q-n)^l[1]*
                 mul(q-i, i=0..n-1), add(b(n+m, j-1)*
                 Stirling2(l[j], m), m=0..l[j]))
               end; forget(b);
           abs(b(0, k))
        end:
    seq(seq(A(n, 1+d-n), n=0..d), d=0..14);
  • Mathematica
    A[n_, k_] := A[n, k] = Module[{ b, l, q}, q = -1; l = Join[Array[Floor[n/k] &, k - Mod[n, k]], Array[ Ceiling[n/k] &, Mod[n, k]]]; b[nn_, j_] := b[nn, j] = If[j == 1, (q - nn)^l[[1]]*Product[q - i, {i, 0, nn - 1}], Sum[b[nn + m, j - 1]*StirlingS2[l[[j]], m], {m, 0, l[[j]]}]]; Abs[b[0, k]]]; Table[Table[A[n, 1 + d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

A048163 a(n) = Sum_{k=1..n} ((k-1)!)^2*Stirling2(n,k)^2.

Original entry on oeis.org

1, 2, 14, 230, 6902, 329462, 22934774, 2193664790, 276054834902, 44222780245622, 8787513806478134, 2121181056663291350, 611373265185174628502, 207391326125004608457782, 81791647413265571604175094, 37109390748309009878392597910, 19192672725746588045912535407702
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of max-closed relations on an ordered n-element domain (see the paper by Jeavons and Cooper, 1995). - Don Knuth, Feb 12 2024

Examples

			1
1 + 1 = 2
1 + 9 + 4 = 14
1 + 49 + 144 + 36 = 230
1 + 225 + 2500 + 3600 + 576 = 6902
... - _Philippe Deléham_, May 30 2015
		

References

  • Lovasz, L. and Vesztergombi, K.; Restricted permutations and Stirling numbers. Combinatorics (Proc. Fifth Hungarian Colloq., Keszthely, 1976), Vol. II, pp. 731-738, Colloq. Math. Soc. Janos Bolyai, 18, North-Holland, Amsterdam-New York, 1978.
  • K. Vesztergombi, Permutations with restriction of middle strength, Stud. Sci. Math. Hungar., 9 (1974), 181-185.

Crossrefs

Main diagonal of array A099594.

Programs

  • Mathematica
    Table[Sum[((k-1)!)^2*StirlingS2[n,k]^2,{k,1,n}],{n,1,20}] (* Vaclav Kotesovec, Jun 21 2013 *)
  • PARI
    a(n)=if(n<1, 0, polcoeff(sum(m=1, n, m^(m-1)*(m-1)!*x^m/prod(k=1, m-1, 1+m*k*x+x*O(x^n))), n)) \\ Paul D. Hanna, Jan 05 2013
    for(n=1,20,print1(a(n),", "))
    
  • PARI
    Stirling2(n, k)=n!*polcoeff(((exp(x+x*O(x^n))-1)^k)/k!, n)
    a(n)=sum(k=1,n,(-1)^(n-k)*k^(n-1)*(k-1)!*Stirling2(n-1, k-1))
    for(n=1, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Jan 06 2013
    
  • PARI
    a(n) = sum(k=1, n, (k-1)!^2*stirling(n,k,2)^2); \\ Michel Marcus, Jun 22 2018

Formula

E.g.f. (with offset 0): Sum((1-exp(-(m+1)*z))^m, m=0..oo)
O.g.f.: Sum_{n>=1} n^(n-1) * (n-1)! * x^n / Product_{k=1..n-1} (1 - n*k*x). - Paul D. Hanna, Jan 05 2013
Limit n->infinity (a(n)/n!)^(1/n)/n = 1/(exp(1)*(log(2))^2) = 0.7656928576... . - Vaclav Kotesovec, Jun 21 2013
a(n) ~ 2*sqrt(Pi) * n^(2*n-3/2) / (sqrt(1-log(2)) * exp(2*n) * (log(2))^(2*n-1)). - Vaclav Kotesovec, May 13 2014
a(n+1) = Sum_{k = 0..n} A163626(n,k)^2. - Philippe Deléham, May 30 2015
a(n) = A306209(2n-2,n-1). - Alois P. Heinz, Feb 01 2019
a(n) = A266695(2n-2). - Alois P. Heinz, Apr 17 2024

Extensions

Entry revised by N. J. A. Sloane, Jul 05 2012

A212084 Triangle T(n,k), n>=0, 0<=k<=2n, read by rows: row n gives the coefficients of the chromatic polynomial of the complete bipartite graph K_(n,n), highest powers first.

Original entry on oeis.org

1, 1, -1, 0, 1, -4, 6, -3, 0, 1, -9, 36, -75, 78, -31, 0, 1, -16, 120, -524, 1400, -2236, 1930, -675, 0, 1, -25, 300, -2200, 10650, -34730, 75170, -102545, 78610, -25231, 0, 1, -36, 630, -6915, 52080, -279142, 1074822, -2942445, 5552680, -6796926, 4787174
Offset: 0

Views

Author

Alois P. Heinz, Apr 30 2012

Keywords

Comments

The complete bipartite graph K_(n,n) has 2n vertices and n^2 = A000290(n) edges. The chromatic polynomial of K_(n,n) has 2n+1 = A005408(n) coefficients.

Examples

			3 example graphs:                     +-----------+
.                 o        o   o      o   o   o   |
.                 |        |\ /|      |\ /|\ /|\ /
.                 |        | X |      | X | X | X
.                 |        |/ \|      |/ \|/ \|/ \
.                 o        o   o      o   o   o   |
.                                     +-----------+
Graph:         K_(1,1)    K_(2,2)      K_(3,3)
Vertices:         2          4            6
Edges:            1          4            9
The complete bipartite graph K_(2,2) is the cycle graph C_4 with chromatic polynomial q^4 -4*q^3 +6*q^2 -3*q => row 2 = [1, -4, 6, -3, 0].
Triangle T(n,k) begins:
  1;
  1,  -1,   0;
  1,  -4,   6,    -3,     0;
  1,  -9,  36,   -75,    78,     -31,       0;
  1, -16, 120,  -524,  1400,   -2236,    1930,     -675, ...
  1, -25, 300, -2200, 10650,  -34730,   75170,  -102545, ...
  1, -36, 630, -6915, 52080, -279142, 1074822, -2942445, ...
  ...
		

Crossrefs

Columns k=0-2 give: A000012, (-1)*A000290, A083374.
Row sums and last elements of rows give: A000007.
Row lengths give: A005408.
Sums of absolute values of row elements give: A048163(n+1).
T(n,2n-1) = (-1)*A092552(n).

Programs

  • Maple
    P:= n-> add(Stirling2(n, k) *mul(q-i, i=0..k-1) *(q-k)^n, k=0..n):
    T:= n-> seq(coeff(P(n), q, 2*n-k), k=0..2*n):
    seq(T(n), n=1..8);

Formula

T(n,k) = [q^(2n-k)] Sum_{j=0..n} (q-j)^n * S2(n,j) * Product_{i=0..j-1} (q-i).

Extensions

T(0,0)=1 prepended by Alois P. Heinz, May 03 2024

A188634 E.g.f.: Sum_{n>=0} (1 - exp(-(n+1)*x))^n/(n+1).

Original entry on oeis.org

1, 1, 4, 46, 1066, 41506, 2441314, 202229266, 22447207906, 3216941445106, 578333776748674, 127464417117501586, 33800841048945424546, 10617398393395844992306, 3898852051843774954576834, 1654948033478889053351543506, 804119629083230641164978005986
Offset: 0

Views

Author

Paul D. Hanna, Dec 28 2012

Keywords

Examples

			E.g.f.: A(x) = 1 + x + 4*x^2/2! + 46*x^3/3! + 1066*x^4/4! + 41506*x^5/5! +...
where
A(x) = 1 + (1-exp(-2*x))/2 + (1-exp(-3*x))^2/3 + (1-exp(-4*x))^3/4 + (1-exp(-5*x))^4/5 + (1-exp(-6*x))^5/6 +...
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(-1)^(k+n)*(k+1)^(n-1)*k!*StirlingS2[n, k],{k,0,n}],{n,0,20}]
    Table[n!*SeriesCoefficient[Sum[(1-E^(-x*(k+1)))^k/(k+1),{k,0,n}],{x,0,n}],{n,0,20}]  (* Vaclav Kotesovec, Dec 30 2012 *)
  • PARI
    {a(n)=n!*polcoeff(sum(k=0, n, (1-exp(-(k+1)*x+x*O(x^n)))^k/(k+1)), n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    {a(n)=sum(j=0,n, (j+1)^(n-1)*sum(i=0,j, (-1)^(n+j-i)*binomial(j,i)*(j-i)^n))}
    for(n=0, 20, print1(a(n), ", "))

Formula

a(n) = Sum_{j=0..n} (j+1)^(n-1) * Sum_{i=0..j} (-1)^(n+j-i)*C(j, i)*(j-i)^n.
Ignoring the initial term, equals a diagonal of array A099594, which forms the poly-Bernoulli numbers B(-k,n).
Limit n->infinity a(n)^(1/n)/n^2 = 0.281682... - Vaclav Kotesovec, Dec 30 2012
a(n) = A266695(2*n-1) for n >= 1. - Alois P. Heinz, Apr 17 2024

A212085 Square array A(n,k), n>=1, k>=1, read by antidiagonals: A(n,k) is the number of n-colorings of the complete bipartite graph K_(k,k).

Original entry on oeis.org

0, 0, 2, 0, 2, 6, 0, 2, 18, 12, 0, 2, 42, 84, 20, 0, 2, 90, 420, 260, 30, 0, 2, 186, 1812, 2420, 630, 42, 0, 2, 378, 7332, 18500, 9750, 1302, 56, 0, 2, 762, 28884, 127220, 121590, 30702, 2408, 72, 0, 2, 1530, 112740, 825860, 1324470, 583422, 81032, 4104, 90
Offset: 1

Views

Author

Alois P. Heinz, Apr 30 2012

Keywords

Comments

The complete bipartite graph K_(n,n) has 2*n vertices and n^2 = A000290(n) edges. The chromatic polynomial of K_(n,n) has 2*n+1 coefficients.
A(n,k) is the number of pairs of strings of length k over an alphabet of size n such that the strings do not share any letter. - Lin Zhangruiyu, Aug 19 2022

Examples

			A(3,1) = 6 because there are 6 3-colorings of the complete bipartite graph K_(1,1): 1-2, 1-3, 2-1, 2-3, 3-1, 3-2.
Square array A(n,k) begins:
   0,   0,    0,      0,       0,        0,         0, ...
   2,   2,    2,      2,       2,        2,         2, ...
   6,  18,   42,     90,     186,      378,       762, ...
  12,  84,  420,   1812,    7332,    28884,    112740, ...
  20, 260, 2420,  18500,  127220,   825860,   5191220, ...
  30, 630, 9750, 121590, 1324470, 13284630, 126657750, ...
		

Crossrefs

Rows n=1-3 give: A000004, A007395, A068293(k+1).
Columns k=1-2 give: A002378(n-1), A091940.

Programs

  • Maple
    A:= (n, k)-> add(Stirling2(k, j) *mul(n-i, i=0..j-1) *(n-j)^k, j=1..k):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..12);
  • Mathematica
    a[n_, k_] := Sum[(-1)^j*(n-j)^k*Pochhammer[-n, j]*StirlingS2[k, j], {j, 1, k}]; Table[a[n-k, k], {n, 1, 11}, {k, n-1, 1, -1}] // Flatten (* Jean-François Alcover, Dec 11 2013 *)

Formula

A(n,k) = Sum_{j=1..k} (n-j)^k * S2(k,j) * Product_{i=0..j-1} (n-i).
A(n,n)/n = A282245(n).

A266858 Number of acyclic orientations of the Turán graph T(n,3).

Original entry on oeis.org

1, 1, 2, 6, 18, 78, 426, 2286, 15402, 122190, 951546, 8724078, 90768378, 928340190, 10779805722, 138779942046, 1759271695338, 24739709631678, 379578822373866, 5743346972756526, 94864142045862282, 1689637343582548590, 29717468115957434586, 563879701735681033998
Offset: 0

Views

Author

Alois P. Heinz, Jan 04 2016

Keywords

Comments

An acyclic orientation is an assignment of a direction to each edge such that no cycle in the graph is consistently oriented. Stanley showed that the number of acyclic orientations of a graph G is equal to the absolute value of the chromatic polynomial X_G(q) evaluated at q=-1.

Crossrefs

Column k=3 of A267383.
Trisection gives A370961.

Programs

  • Mathematica
    A[n_, k_] := A[n, k] = Module[{b, l, q}, q = -1; l = Join[Array[Floor[ n/k]&, k - Mod[n, k]], Array[Ceiling[n/k]&, Mod[n, k]]]; b[nn_, j_] := b[nn, j] = If[j==1, (q-nn)^l[[1]] Product[q-i, {i, 0, nn-1}], Sum[b[nn + m, j-1] StirlingS2[l[[j]], m], {m, 0, l[[j]]}]]; Abs[b[0, k]]];
    a[n_] := A[n, 3];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Aug 20 2018, after Alois P. Heinz *)

Formula

a(n) ~ n! / (2*(1 - log(3/2)) * 3^n * (log(3/2))^(n+1)). - Vaclav Kotesovec, Feb 18 2017

A266972 Triangle T(n,k), n>=0, 0<=k<=n, read by rows: row n gives the coefficients of the chromatic polynomial of the (n,2)-Turán graph, highest powers first.

Original entry on oeis.org

1, 1, 0, 1, -1, 0, 1, -2, 1, 0, 1, -4, 6, -3, 0, 1, -6, 15, -17, 7, 0, 1, -9, 36, -75, 78, -31, 0, 1, -12, 66, -202, 351, -319, 115, 0, 1, -16, 120, -524, 1400, -2236, 1930, -675, 0, 1, -20, 190, -1080, 3925, -9164, 13186, -10489, 3451, 0, 1, -25, 300, -2200, 10650, -34730, 75170, -102545, 78610, -25231, 0
Offset: 0

Views

Author

Alois P. Heinz, Jan 07 2016

Keywords

Comments

The (n,2)-Turán graph is also the complete bipartite graph K_{floor(n/2),ceiling(n/2)}.

Examples

			Triangle T(n,k) begins:
  1;
  1,   0;
  1,  -1,   0;
  1,  -2,   1,    0;
  1,  -4,   6,   -3,    0;
  1,  -6,  15,  -17,    7,     0;
  1,  -9,  36,  -75,   78,   -31,    0;
  1, -12,  66, -202,  351,  -319,  115,    0;
  1, -16, 120, -524, 1400, -2236, 1930, -675,  0;
  ...
		

Crossrefs

Columns k=0-1 give: A000012, (-1)*A002620.
Main diagonal gives A000007.

Programs

  • Maple
    P:= n-> (h-> expand(add(Stirling2(h, j)*mul(q-i,
        i=0..j-1)*(q-j)^(n-h), j=0..h)))(iquo(n, 2)):
    T:= n-> (p-> seq(coeff(p, q, n-i), i=0..n))(P(n)):
    seq(T(n), n=0..12);

Formula

T(n,k) = [q^(n-k)] Sum_{j=0..floor(n/2)} (q-j)^(n-floor(n/2)) * Stirling2(floor(n/2),j) * Product_{i=0..j-1} (q-i).
Sum_{k=0..n} abs(T(n,k)) = A266695(n).
Showing 1-8 of 8 results.