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.

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

A266695 Number of acyclic orientations of the Turán graph T(n,2).

Original entry on oeis.org

1, 1, 2, 4, 14, 46, 230, 1066, 6902, 41506, 329462, 2441314, 22934774, 202229266, 2193664790, 22447207906, 276054834902, 3216941445106, 44222780245622, 578333776748674, 8787513806478134, 127464417117501586, 2121181056663291350, 33800841048945424546
Offset: 0

Views

Author

Alois P. Heinz, Jan 02 2016

Keywords

Comments

The Turán graph T(n,2) is also the complete bipartite graph K_{floor(n/2),ceiling(n/2)}.
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=2 of A267383.
Bisections give A048163 (even part), A188634 (odd part).

Programs

  • Maple
    a:= n-> (p-> add(Stirling2(n-p+1, i+1)*Stirling2(p+1, i+1)*
             i!^2, i=0..p))(iquo(n, 2)):
    seq(a(n), n=0..25);
  • Mathematica
    a[n_] := With[{q=Quotient[n, 2]}, Sum[StirlingS2[n-q+1, i+1] StirlingS2[ q+1, i+1] i!^2, {i, 0, q}]];
    Array[a, 24, 0] (* Jean-François Alcover, Nov 06 2018 *)

Formula

a(n) = Sum_{i=0..floor(n/2)} i!^2 * Stirling2(ceiling(n/2)+1,i+1) * Stirling2(floor(n/2)+1,i+1).
a(n) = A099594(floor(n/2),ceiling(n/2)).
a(n) = Sum_{k=0..n} abs(A266972(n,k)).
a(n) ~ n! / (sqrt(1-log(2)) * 2^n * (log(2))^(n+1)). - Vaclav Kotesovec, Feb 18 2017

A372261 Number T(n,k,j) of acyclic orientations of the complete tripartite graph K_{n,k,j}; triangle of triangles T(n,k,j), n>=0, k=0..n, j=0..k, read by rows.

Original entry on oeis.org

1, 1, 2, 6, 1, 4, 18, 14, 78, 426, 1, 8, 54, 46, 330, 2286, 230, 1902, 15402, 122190, 1, 16, 162, 146, 1374, 12090, 1066, 10554, 101502, 951546, 6902, 76110, 822954, 8724078, 90768378, 1, 32, 486, 454, 5658, 63198, 4718, 57054, 657210, 7290942, 41506, 525642, 6495534, 78463434, 928340190
Offset: 0

Views

Author

Alois P. Heinz, Apr 24 2024

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.

Examples

			Triangle of triangles T(n,k,j) begins:
    1;
  ;
    1;
    2,    6;
  ;
    1;
    4,   18;
   14,   78,   426;
  ;
    1;
    8,   54;
   46,  330,  2286;
  230, 1902, 15402, 122190;
  ;
  ...
		

Crossrefs

T(n,n,n) gives A370961.
T(n,n,0) gives A048163(n+1).
T(n+1,n,0) gives A188634(n+1).
T(n,1,1) gives A008776.
T(n,2,2) gives A370960.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, add(
          expand(x*g(n-j))*binomial(n-1, j-1), j=1..n))
        end:
    T:= proc() option remember; local q, l, b; q, l, b:= -1, [args],
          proc(n, j) option remember; `if`(j=1, mul(q-i, i=0..n-1)*
            (q-n)^l[1], add(b(n+m, j-1)*coeff(g(l[j]), x, m), m=0..l[j]))
          end; abs(b(0, nops(l)))
        end:
    seq(seq(seq(T(n, k, j), j=0..k), k=0..n), n=0..5);
  • Mathematica
    g[n_] := g[n] = If[n == 0, 1, Sum[Expand[x*g[n - j]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    T[n_, k_, j_] := T[n, k, j] = Module[{q = -1, l = {n, k, j}, b},
       b[n0_, j0_] := b[n0, j0] = If[j0 == 1, Product[q - i, {i, 0, n0 - 1}]*
       (q - n0)^n, Sum[b[n0 + m, j0 - 1]*Coefficient[g[l[[j0]]], x, m],
       {m, 0, l[[j0]]}]];
    Abs[b[0, 3]]];
    Table[Table[Table[T[n, k, j], {j, 0, k}], {k, 0, n}], {n, 0, 5}] // Flatten (* Jean-François Alcover, Jun 14 2024, after Alois P. Heinz *)

A191908 a(n) = Sum_{k=0..n} (k+1)^(n-1)*k!*StirlingS2(n,k).

Original entry on oeis.org

1, 1, 8, 154, 5690, 346366, 31540898, 4022618734, 685081183970, 150294263931406, 41295554517419138, 13894282169096540014, 5619799582929595762850, 2690722557848361804976846, 1505284957795131345177533378, 973008827731313629949682056494
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 30 2012

Keywords

Crossrefs

Cf. A188634.

Programs

  • Mathematica
    Table[Sum[(k+1)^(n-1)*k!*StirlingS2[n, k],{k,0,n}],{n,0,20}]
    Flatten[{1,Table[Sum[(j+1)^(n-1)*Sum[(-1)^i*Binomial[j,i]*(j-i)^n,{i,0,j}],{j,0,n}],{n,1,20}]}]
    Table[n!*SeriesCoefficient[Sum[(E^(x*(k+1))-1)^k/(k+1),{k,0,n}],{x,0,n}],{n,0,20}]
    (* program for numerical value of the limit n->infinity a(n)^(1/n)/n^2 *) r^2*Exp[1/r-2]*(1+Exp[-1/r])/.FindRoot[r*(1+Exp[-1/r])*LambertW[-Exp[-1/r]/r] == -1, {r, 1/2}, WorkingPrecision -> 50]
  • PARI
    {a(n)=n!*polcoeff(sum(k=0, n, (exp((k+1)*x+x*O(x^n)) - 1)^k/(k+1)), n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    {a(n)=polcoeff(sum(m=0, n, (m+1)^(m-1)*m!*x^m/prod(k=1, m, 1-(m+1)*k*x+x*O(x^n))), n)}
    for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Oct 26 2014

Formula

a(n) = Sum_{j=0..n} ((j+1)^(n-1) * Sum_{i=0..j} (-1)^i*C(j, i)*(j-i)^n).
Limit n->infinity a(n)^(1/n)/n^2 = 0.42780682830692054814273... = r/exp(1) * (1/r+LambertW(-exp(-1/r)/r))^(r-1) / (-LambertW(-exp(-1/r)/r))^r, where r = 0.87370243323966833... is the root of the equation r*(1+exp(-1/r)) * LambertW(-exp(-1/r)/r) = -1.
E.g.f.: Sum_{n>=0} (exp((n+1)*x) - 1)^n / (n+1). - Paul D. Hanna, Dec 30 2012
O.g.f.: Sum_{n>=0} (n+1)^(n-1) * n! * x^n / Product_{k=1..n} (1 - (n+1)*k*x). - Paul D. Hanna, Oct 26 2014
Showing 1-4 of 4 results.