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

A230878 Irregular triangle read by rows: T(n,k) = number of 2-packed n X n matrices with exactly k nonzero entries (0 <= k <= n^2).

Original entry on oeis.org

1, 0, 2, 0, 0, 8, 32, 16, 0, 0, 0, 48, 720, 2880, 4992, 4608, 2304, 512, 0, 0, 0, 0, 384, 13824, 143872, 739328, 2320896, 4964352, 7659520, 8749056, 7421952, 4587520, 1966080, 524288, 65536, 0, 0, 0, 0, 0, 3840, 268800, 5504000, 57068800, 372416000
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2013

Keywords

Comments

A k-packed matrix of size n X n is a matrix with entries in the alphabet A_k = {0,1, ..., k} such that each row and each column contains at least one nonzero entry.

Examples

			Triangle begins:
1
0 2
0 0 8 32 16
0 0 0 48 720 2880 4992 4608 2304 512
...
		

Crossrefs

Row sums are A230879.
Column sums are A230880.

Programs

  • Mathematica
    p[k_, n_, l_] := Sum[(-1)^(i+j)*Binomial[n, i]*Binomial[n,j]*Binomial[i*j, l]*k^l, {i, 0, n}, {j, 0, n}];
    T[n_, k_] := p[2, n, k];
    Table[T[n, k], {n, 0, 5}, {k, 0, n^2}] // Flatten (* Jean-François Alcover, Oct 08 2017, translated from PARI *)
  • PARI
    \\ T(n,k) = p(2,n,k) (see Cheballah et al. ref).
    p(k,n,l) = {sum(i=0, n, sum(j=0, n, (-1)^(i+j) * binomial(n,i) * binomial(n,j) * binomial(i*j,l) * k^l))}
    for (n=0,5, for(k=0,n^2, print1(p(2,n,k), ", ")); print); \\ Andrew Howroyd, Sep 20 2017

Formula

From Andrew Howroyd, Sep 20 2017: (Start)
T(n, k) = Sum_{i=0..n} Sum_{j=0..n} (-1)^(i+j) * binomial(n,i) * binomial(n,j) * binomial(i*j,k) * 2^k.
T(n, k) = 0 for n > k.
T(n, n) = A000165(n).
(End)

Extensions

Terms a(18) and beyond from Andrew Howroyd, Sep 20 2017

A230880 Number of 2-packed matrices with exactly n nonzero entries.

Original entry on oeis.org

1, 2, 8, 80, 1120, 20544, 463744, 12422656, 384947200, 13541822464, 533049493504, 23210958688256, 1107652218822656, 57482801016422400, 3223015475535380480, 194157345516262588416, 12505948470244176953344, 857670052436844788318208, 62395270194815987194789888
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2013

Keywords

Comments

A k-packed matrix of size n X n is a matrix with entries in the alphabet A_k = {0,1, ..., k} such that each row and each column contains at least one nonzero entry.

Crossrefs

Programs

  • Mathematica
    b[n_] := Sum[StirlingS1[n, k]*Sum[(m!)^2*StirlingS2[k, m]^2, {m, 0, k}], {k, 0, n}]/n!;
    a[n_] := 2^n*b[n];
    Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Oct 08 2017, translated from PARI *)
  • PARI
    \\ here b(n) is A104602.
    b(n) = {sum(m=0, n, sum(k=0, n, stirling(n,k,1) * m!^2 * stirling(k,m,2)^2)) / n!}
    a(n) = 2^n * b(n); \\ Andrew Howroyd, Sep 20 2017

Formula

Cheballah et al. give an explicit formula.
From Andrew Howroyd, Sep 20 2017: (Start)
a(n) = Sum_{r=1..n} Sum_{i=0..r} Sum_{j=0..r} (-1)^(i+j) * binomial(r,i) * binomial(r,j) * binomial(i*j,n) * 2^n.
a(n) = 2^n * A104602(n).
(End)

Extensions

Terms a(9) and beyond from Andrew Howroyd, Sep 20 2017
Showing 1-2 of 2 results.