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.

A104601 Triangle T(r,n) read by rows: number of n X n (0,1)-matrices with exactly r entries equal to 1 and no zero row or columns.

Original entry on oeis.org

1, 0, 2, 0, 4, 6, 0, 1, 45, 24, 0, 0, 90, 432, 120, 0, 0, 78, 2248, 4200, 720, 0, 0, 36, 5776, 43000, 43200, 5040, 0, 0, 9, 9066, 222925, 755100, 476280, 40320, 0, 0, 1, 9696, 727375, 6700500, 13003620, 5644800, 362880, 0, 0, 0, 7480, 1674840
Offset: 1

Views

Author

Ralf Stephan, Mar 27 2005

Keywords

Examples

			1
0,2
0,4,6
0,1,45,24
0,0,90,432,120
0,0,78,2248,4200,720
0,0,36,5776,43000,43200,5040
0,0,9,9066,222925,755100,476280,40320
0,0,1,9696,727375,6700500,13003620,5644800,362880
0,0,0,7480,1674840,37638036,179494350,226262400,71850240,3628800
		

Crossrefs

Right-edge diagonals include A000142, A055602, A055603. Row sums are in A104602.
Column sums are in A048291. The triangle read by columns = A055599.

Programs

  • Mathematica
    t[r_, n_] := Sum[ Sum[ (-1)^(2n - d - k/d)*Binomial[n, d]*Binomial[n, k/d]*Binomial[k, r], {d, Divisors[k]}], {k, r, n^2}]; Flatten[ Table[t[r, n], {r, 1, 10}, {n, 1, r}]] (* Jean-François Alcover, Jun 27 2012, from formula *)
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],Union[First/@#]==Union[Last/@#]==Range[k]&]],{n,6},{k,n}] (* Gus Wiseman, Nov 14 2018 *)

Formula

T(r, n) = Sum{l>=r, Sum{d|l, (-1)^(2n-d-l/d)*C(n, d)*C(n, l/d)*C(l, r) }}.
E.g.f.: Sum(((1+x)^n-1)^n*exp((1-(1+x)^n)*y)*y^n/n!,n=0..infinity). - Vladeta Jovovic, Feb 24 2008