login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of n X n matrices with nonnegative integer entries such that the sum of the elements of each row is equal to the index of that row.
1

%I #70 Nov 19 2023 06:34:07

%S 1,1,6,180,28000,23152500,103507455744,2532712433771520,

%T 342315030877028352000,257389071045194840814562500,

%U 1082814493908215083601185600000000,25605944807023092680403880661295843852288,3416912747607221845915134383073991514372073062400

%N Number of n X n matrices with nonnegative integer entries such that the sum of the elements of each row is equal to the index of that row.

%C Also the number of n X n matrices with nonnegative integer entries such that the sum of the elements of each column is equal to the index of that column.

%H Michael Richard, <a href="/A362174/b362174.txt">Table of n, a(n) for n = 0..52</a>

%F a(n) = Product_{k=1..n} binomial(n+k-1,n-1).

%F a(n) = A001700(n-1)*A306789(n-1) for n >= 1.

%F a(n) = a(n-1)*(2n-1)*(2n-2)!^2/(n*(n-1)!^3*(n-1)^(n-1)). - _Chai Wah Wu_, Jun 26 2023

%F a(x) = x^x*G(2x+1)*(G(x+1)^(x-1)/G(x+2)^(x+1)) where G(x) is the Barnes G-function is a differentiable continuation of a(n) to the nonnegative reals. - _Michael Richard_, Jun 27 2023

%F a(n) ~ A * 2^(2*n^2 - n/2 - 7/12) / (Pi^((n+1)/2) * exp(n^2/2 - n + 1/6) * n^(n/2 + 5/12)), where A is the Glaisher-Kinkelin constant A074962. - _Vaclav Kotesovec_, Nov 19 2023

%e a(1) = 1 as the only 1 X 1 matrix that satisfies the constraints is [1].

%e a(2) = 6 as there are 2 2d-vectors within the constraints with components that sum to 1 and independently 3 2d-vectors within the constraints with components that sum to 2. They are as follows: [[0 1],[1 1]], [[0 1],[2 0]], [[0 1],[0 2]], [[1 0],[1 1]], [[1 0],[2 0]], [[1 0],[0 2]],

%e a(3) = 180 as there are 3 3d-vectors within the constraints with components that sum to 1, 6 that sum to 2, and 10 that sum to 3. 3*6*10 = 180.

%p a:= n-> mul(binomial(n+k-1, n-1), k=1..n):

%p seq(a(n), n=0..15);

%t a[n_] := Product[Binomial[n + k - 1, n - 1], {k, 1, n}]

%o (Python)

%o from math import comb, prod

%o def a(n): return prod(comb(n+k, n-1) for k in range(n))

%o (Python)

%o from math import factorial

%o from functools import lru_cache

%o @lru_cache(maxsize=None)

%o def A362174(n): return A362174(n-1)*(2*n-1)*factorial(2*n-2)**2//n//factorial(n-1)**3//(n-1)**(n-1) if n else 1 # _Chai Wah Wu_, Jun 26 2023

%o (PARI) a(n) = prod(k=1, n, binomial(n+k-1,n-1)); \\ _Michel Marcus_, Jun 25 2023

%Y Cf. A001700, A306789, A361749.

%K nonn

%O 0,3

%A _Michael Richard_, Jun 12 2023