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-6 of 6 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

A027643 Numerators of poly-Bernoulli numbers B_n^(k) with k=2.

Original entry on oeis.org

1, 1, -1, -1, 7, 1, -38, -5, 11, 7, -3263, -15, 13399637, 7601, -8364, -91, 1437423473, 3617, -177451280177, -745739, 166416763419, 3317609, -17730427802974, -5981591, 51257173898346323, 5436374093, -107154672791057, -213827575
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A027643:= func< n,k | Numerator( (&+[(-1)^(j+n)*Factorial(j)*StirlingSecond(n, j)/(j+1)^k: j in [0..n]]) ) >;
    [A027643(n,2): n in [0..30]]; // G. C. Greubel, Aug 02 2022
    
  • Maple
    a := n -> numer((-1)^n*add( (-1)^m*m!*Stirling2(n, m)/(m+1)^2, m=0..n)):
    seq(a(n), n=0..27);
  • Mathematica
    k=2; Table[Numerator[(-1)^n Sum[(-1)^m m! StirlingS2[n, m]/(m+1)^k, {m, 0, n}]], {n, 0, 27}] (* Michael De Vlieger, Oct 28 2015 *)
  • SageMath
    def A027643(n,k): return numerator( sum((-1)^(n+j)*factorial(j)*stirling_number2(n,j)/(j+1)^k for j in (0..n)) )
    [A027643(n,2) for n in (0..30)] # G. C. Greubel, Aug 02 2022

Formula

a(n) = numerator of Sum_{k=0..n} W(n,k)*h(k+1) with W(n,k) = (-1)^(n-k)*k!* Stirling2(n+1,k+1) the Worpitzky numbers and h(n) = Sum_{k=1..n} 1/k^2 the generalized harmonic numbers of order 2. - Peter Luschny, Sep 28 2017

A027650 Poly-Bernoulli numbers B_n^(k) with k=-3.

Original entry on oeis.org

1, 8, 46, 230, 1066, 4718, 20266, 85310, 354106, 1455278, 5938186, 24104990, 97478746, 393095438, 1581931306, 6356390270, 25511588986, 102304505198, 409992599626, 1642294397150, 6576150108826, 26325519044558, 105364834103146, 421647614381630, 1687155299822266
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the number of acyclic orientations of the complete bipartite graph K_{3,n}. - Vincent Pilaud, Sep 15 2020

Crossrefs

First differences of A016269.
Row 3 of array A099594.

Programs

  • Magma
    [6*4^n-6*3^n+2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    a:= (n, k) -> (-1)^n*sum((-1)^j*j!*Stirling2(n, j)/(j+1)^k, j=0..n);
    seq(a(n, -3), n = 0..30);
  • Mathematica
    Table[6*4^n-6*3^n+2^n, {n,0,30}] (* G. C. Greubel, Feb 07 2018 *)
  • PARI
    Vec((1-x)/((1-2*x)*(1-3*x)*(1-4*x)) + O(x^30)) \\ Michel Marcus, Feb 13 2015
    
  • SageMath
    [2^n -6*3^n +6*4^n for n in (0..30)] # G. C. Greubel, Aug 02 2022

Formula

a(n) = 6*4^n - 6*3^n + 2^n. - Vladeta Jovovic, Nov 14 2003
G.f.: (1-x)/((1-2*x)*(1-3*x)*(1-4*x)).
E.g.f.: exp(2*x) - 6*exp(3*x) + 6*exp(4*x). - G. C. Greubel, Aug 02 2022

A027648 Denominators of poly-Bernoulli numbers B_n^(k) with k=4.

Original entry on oeis.org

1, 16, 1296, 3456, 3240000, 144000, 1555848000, 59270400, 5000940000, 1587600, 9762501672000, 11269843200, 221794053611130000, 39390663312000, 5849513501832000, 519437318400, 407131014322092060000, 1063331477208000
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A027648:= func< n,k | Denominator( (&+[(-1)^(j+n)*Factorial(j)*StirlingSecond(n, j)/(j+1)^k: j in [0..n]]) ) >;
    [A027648(n,4): n in [0..20]]; // G. C. Greubel, Aug 02 2022
    
  • Maple
    a:= (n, k) -> denom( (-1)^n*add((-1)^m*m!*Stirling2(n, m)/(m+1)^k, m = 0..n) );
    seq(a(n, 4), n = 0..30);
  • Mathematica
    With[{k = 4}, Table[Denominator@ Sum[((-1)^(m + n))*m!*StirlingS2[n, m]*(m + 1)^(-k), {m, 0, n}], {n, 0, 17}]] (* Michael De Vlieger, Mar 18 2017 *)
  • SageMath
    def A027648(n,k): return denominator( sum((-1)^(n+j)*factorial(j)*stirling_number2(n,j)/(j+1)^k for j in (0..n)) )
    [A027648(n,4) for n in (0..20)] # G. C. Greubel, Aug 02 2022

Formula

a(n) = denominator of Sum_{j=0..n} (-1)^(n+j) * j! * Stirling2(n, j) * (j+1)^(-k), for k = 4.

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 *)

A329718 The number of open tours by a biased rook on a specific f(n) X 1 board, where f(n) = A070941(n) and cells are colored white or black according to the binary representation of 2n.

Original entry on oeis.org

1, 2, 4, 4, 8, 6, 14, 8, 16, 10, 24, 10, 46, 24, 46, 16, 32, 18, 44, 14, 84, 34, 68, 18, 146, 68, 138, 44, 230, 84, 146, 32, 64, 34, 84, 22, 160, 54, 112, 22, 276, 106, 224, 54, 376, 106, 192, 34, 454, 192, 406, 112, 690, 224, 406, 84, 1066, 376, 690, 160
Offset: 0

Views

Author

Mikhail Kurkov, Nov 19 2019 [verification needed]

Keywords

Comments

A cell is colored white if the binary digit is 0 and a cell is colored black if the binary digit is 1. A biased rook on a white cell moves only to the left and otherwise moves only to the right.

Examples

			a(1) = 2 because the binary expansion of 2 is 10 and there are 2 open biased rook's tours, namely 12 and 21.
a(2) = 4 because the binary expansion of 4 is 100 and there are 4 open biased rook's tours, namely 132, 213, 231 and 321.
a(3) = 4 because the binary expansion of 6 is 110 and there are 4 open biased rook's tours, namely 123, 132, 231 and 312.
		

Crossrefs

Formula

a(n) = f(n) + f(A059894(n)) = f(n) + f(2*A053645(n)) for n > 0 with a(0) = 1 where f(n) = A329369(n).
Sum_{k=0..2^n-1} a(k) = 2*(n+1)! - 1 for n >= 0.
a((4^n-1)/3) = 2*A110501(n+1) for n > 0.
a(2^1*(2^n-1)) = A027649(n),
a(2^2*(2^n-1)) = A027650(n),
a(2^3*(2^n-1)) = A027651(n),
a(2^4*(2^n-1)) = A283811(n),
and more generally, a(2^m*(2^n-1)) = T(n,m+1) for n >= 0, m >= 0 where T(n,m) = Sum_{k=0..n} k!*(k+1)^m*Stirling2(n,k)*(-1)^(n-k).
Showing 1-6 of 6 results.