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.

A361749 a(n) is the number of n X n matrices with nonnegative integer entries, row sums 1,2,...,n and column sums 1,2,...,n.

Original entry on oeis.org

1, 1, 2, 12, 261, 22645, 8264346, 13150070522, 93589674933872, 3036609755945925595, 455845471095088280120142, 320342093420041869298750385976, 1063978124653925432733949863518874116, 16835366182312565093823092118182447742597067
Offset: 0

Views

Author

Robert Israel, Mar 23 2023

Keywords

Examples

			a(3) = 12 because there are 12 possible 3 X 3 matrices with nonnegative integer entries, row sums 1,2,3 and column sums 1,2,3:
  [ 0 0 1 ]   [ 0 0 1 ]   [ 0 0 1 ]   [ 0 0 1 ]
  [ 0 0 2 ]   [ 0 1 1 ]   [ 0 2 0 ]   [ 1 0 1 ]
  [ 1 2 0 ],  [ 1 1 1 ],  [ 1 0 2 ],  [ 0 2 1 ],
  .
  [ 0 0 1 ]   [ 0 1 0 ]   [ 0 1 0 ]   [ 0 1 0 ]
  [ 1 1 0 ]   [ 0 0 2 ]   [ 0 1 1 ]   [ 1 0 1 ]
  [ 0 1 2 ],  [ 1 1 1 ],  [ 1 0 2 ],  [ 0 1 2 ],
  .
  [ 0 1 0 ]   [ 1 0 0 ]   [ 1 0 0 ]   [ 1 0 0 ]
  [ 1 1 0 ]   [ 0 0 2 ]   [ 0 1 1 ]   [ 0 2 0 ]
  [ 0 0 3 ],  [ 0 2 1 ],  [ 0 1 2 ],  [ 0 0 3 ].
		

Crossrefs

Programs

  • Maple
    G:= proc(L,R,k) option remember;
    # number of solutions with first k entries of first row 0
    local m,n,i;
    m:= nops(L); n:= nops(R);
    if m <= 1 then return 1 fi;
    if L[1] > convert(R[k+1..n],`+`) then return 0 fi;
    if k = n-1 then return procname(L[2..-1],subsop(n = R[n]-L[1], R),0) fi;
    add(procname(subsop(1=L[1]-i, L), subsop(k+1=R[k+1]-i, R), k+1), i=0..min(L[1],R[k+1]))
    end proc:
    seq(G([$1..n],[$1..n],0), n=0..8);

Extensions

a(10)-a(13) from Andrew Howroyd, Mar 29 2023
a(0)=1 prepended by Alois P. Heinz, Jun 26 2023