A257493
Number A(n,k) of n X n nonnegative integer matrices with all row and column sums equal to k; square array A(n,k), n >= 0, k >= 0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 6, 1, 1, 1, 4, 21, 24, 1, 1, 1, 5, 55, 282, 120, 1, 1, 1, 6, 120, 2008, 6210, 720, 1, 1, 1, 7, 231, 10147, 153040, 202410, 5040, 1, 1, 1, 8, 406, 40176, 2224955, 20933840, 9135630, 40320, 1, 1, 1, 9, 666, 132724, 22069251, 1047649905, 4662857360, 545007960, 362880, 1
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, ...
1, 2, 3, 4, 5, 6, 7, ...
1, 6, 21, 55, 120, 231, 406, ...
1, 24, 282, 2008, 10147, 40176, 132724, ...
1, 120, 6210, 153040, 2224955, 22069251, 164176640, ...
1, 720, 202410, 20933840, 1047649905, 30767936616, 602351808741, ...
- Alois P. Heinz, Antidiagonals n = 0..20, flattened
- E. Banaian, S. Butler, C. Cox, J. Davis, J. Landgraf and S. Ponce, A generalization of Eulerian numbers via rook placements, arXiv:1508.03673 [math.CO], 2015.
- D. M. Jackson & G. H. J. van Rees, The enumeration of generalized double stochastic nonnegative integer square matrices, SIAM J. Comput., 4.4 (1975), 474-477. (Annotated scanned copy)
- Richard J. Mathar, 2-regular Digraphs of the Lovelock Lagrangian, arXiv:1903.12477 [math.GM], 2019.
- Dennis Pixton, Ehrhart polynomials for n = 1, ..., 9
- M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements, Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970. [Annotated scanned copy]
-
with(numtheory):
b:= proc(n, k) option remember; `if`(n=1, 1, add(
`if`(bigomega(d)=k, b(n/d, k), 0), d=divisors(n)))
end:
A:= (n, k)-> b(mul(ithprime(i), i=1..n)^k, k):
seq(seq(A(n, d-n), n=0..d), d=0..8);
-
b[n_, k_] := b[n, k] = If[n==1, 1, Sum[If[PrimeOmega[d]==k, b[n/d, k], 0], {d, Divisors[n]}]]; A[n_, k_] := b[Product[Prime[i], {i, 1, n}]^k, k]; Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 20 2016, after Alois P. Heinz *)
-
T(n, k)={
local(M=Map(Mat([n, 1])));
my(acc(p, v)=my(z); mapput(M, p, if(mapisdefined(M, p, &z), z+v, v)));
my(recurse(h, p, q, v, e) = if(!p, if(!e, acc(q, v)), my(i=poldegree(p), t=pollead(p)); self()(k, p-t*x^i, q+t*x^i, v, e); for(m=1, h-i, for(j=1, min(t, e\m), self()(if(j==t, k, i+m-1), p-j*x^i, q+j*x^(i+m), binomial(t, j)*v, e-j*m)))));
for(r=1, n, my(src=Mat(M)); M=Map(); for(i=1, matsize(src)[1], recurse(k, src[i, 1], 0, src[i, 2], k))); vecsum(Mat(M)[, 2])
} \\ Andrew Howroyd, Apr 04 2020
-
bigomega = sloane.A001222
@cached_function
def b(n, k):
if n == 1:
return 1
return sum(b(n//d, k) if bigomega(d) == k else 0 for d in n.divisors())
def A(n, k):
return b(prod(nth_prime(i) for i in (1..n))^k, k)
[A(n, d-n) for d in (0..10) for n in (0..d)] # Freddy Barrera, Dec 27 2018, translated from Maple
-
from sage.combinat.integer_matrices import IntegerMatrices
[IntegerMatrices([d-n]*n, [d-n]*n).cardinality() for d in (0..10) for n in (0..d)] # Freddy Barrera, Dec 27 2018
A001499
Number of n X n matrices with exactly 2 1's in each row and column, other entries 0.
Original entry on oeis.org
1, 0, 1, 6, 90, 2040, 67950, 3110940, 187530840, 14398171200, 1371785398200, 158815387962000, 21959547410077200, 3574340599104475200, 676508133623135814000, 147320988741542099484000, 36574751938491748341360000, 10268902998771351157327104000
Offset: 0
- R. Bricard, L'Intermédiaire des Mathématiciens, 8 (1901), 312-313.
- L. Comtet, Advanced Combinatorics, Reidel, 1974, Sect. 6.3 Multipermutations, pp. 235-236, P(n,2), bipermutations.
- L. Erlebach and O. Ruehr, Problem 79-5, SIAM Review. Solution by D. E. Knuth. Reprinted in Problems in Applied Mathematics, ed. M. Klamkin, SIAM, 1990, p. 350.
- Shanzhen Gao and Kenneth Matheis, Closed formulas and integer sequences arising from the enumeration of (0,1)-matrices with row sum two and some constant column sums. In Proceedings of the Forty-First Southeastern International Conference on Combinatorics, Graph Theory and Computing. Congr. Numer. 202 (2010), 45-53.
- J. T. Lewis, Maximal L-free subsets of a squarefree array, Congressus Numerantium, 141 (1999), 151-155.
- R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Cor. 5.5.11 (b).
- M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements. Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970.
- J. H. van Lint and R. M. Wilson, A Course in Combinatorics (Cambridge University Press, Cambridge, 1992), pp. 152-153. [The second edition is said to be a better reference.]
- Alois P. Heinz, Table of n, a(n) for n = 0..200 (terms n = 0..48 from R. W. Robinson)
- H. Anand, V. C. Dumir and H. Gupta, A combinatorial distribution problem, Duke Math. J., 33 (1996), 757-769.
- Paul Barry, On the Connection Coefficients of the Chebyshev-Boubaker polynomials, The Scientific World Journal, Volume 2013 (2013), Article ID 657806.
- L. Carlitz, Enumeration of symmetric arrays, Duke Math. J., Vol. 33 (1966), 771-782.
- Sally Cockburn and Joshua Lesperance, Deranged Socks, Mathematics Magazine, Vol. 86, no. 2, April 2013, pp. 97-109.
- L. Erlebach and O. Ruehr, Problem 79-5, SIAM Review, Vol. 21, No. 1 (Jan., 1979), p. 140. Solution by D. E. Knuth, SIAM Review, Vol. 22, No. 1 (Jan., 1980), pp. 101-102.
- M. E. Kuczma, 0-1-Matrices with Line-Sums Equal to 2, Am. Math. Month. 99 (1992) 959-961, E3419.
- Rui-Li Liu and Feng-Zhen Zhao, New Sufficient Conditions for Log-Balancedness, With Applications to Combinatorial Sequences, J. Int. Seq., Vol. 21 (2018), Article 18.5.7.
- M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements, Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970. [Annotated scanned copy]
- Zhonghua Tan, Shanzhen Gao, and H. Niederhausen, Enumeration of (0,1) matrices with constant row and column sums, Appl. Math. Chin. Univ. 21 (4) (2006) 479-486.
- Bo-Ying Wang and Fuzhen Zhang, On the precise number of (0,1)-matrices in A(R,S), Discrete Math. 187 (1998), no. 1-3, 211--220. MR1630720 (99f:05010). - From _N. J. A. Sloane_, Jun 07 2012
- Index entries for sequences related to binary matrices
-
a001499 n = a001499_list !! n
a001499_list = 1 : 0 : 1 : zipWith (*) (drop 2 a002411_list)
(zipWith (+) (zipWith (*) [3, 5 ..] $ tail a001499_list)
(zipWith (*) (tail a000290_list) a001499_list))
-- Reinhard Zumkeller, Jun 02 2013
-
a[n_] := (n-1)*n!*Gamma[n-1/2]*Hypergeometric1F1[2-n, 3/2-n, -1/2]/Sqrt[Pi]; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Oct 06 2011, after first formula *)
-
a(n)=if(n<2,n==0,(n^2-n)*(a(n-1)+(n-1)/2*a(n-2)))
-
seq(n)={Vec(serlaplace(serlaplace(exp(-x/2 + O(x*x^n))/sqrt(1-x + O(x*x^n)))))}; \\ Andrew Howroyd, Sep 09 2018
A001500
Number of stochastic matrices of integers: n X n arrays of nonnegative integers with all row and column sums equal to 3.
Original entry on oeis.org
1, 1, 4, 55, 2008, 153040, 20933840, 4662857360, 1579060246400, 772200774683520, 523853880779443200, 477360556805016931200, 569060910292172349004800, 868071731152923490921728000, 1663043727673392444887284377600, 3937477620391471128913917360384000
Offset: 0
a(2) = 4 with: [0 3] [1 2] [2 1] [3 0]
[3 0], [2 1], [1 2], [0 3]. - _Bernard Schott_, Oct 15 2019
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 125, Problem 25(4), b_n (but beware errors).
- I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983.
- R. C. Read, Some Enumeration Problems in Graph Theory. Ph.D. Dissertation, Department of Mathematics, Univ. London, 1958.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements. Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970.
- Alois P. Heinz, Table of n, a(n) for n = 0..180
- Esther M. Banaian, Generalized Eulerian Numbers and Multiplex Juggling Sequences, (2016). All College Thesis Program. Paper 24.
- E. Banaian, S. Butler, C. Cox, J. Davis, J. Landgraf and S. Ponce A generalization of Eulerian numbers via rook placements, arXiv:1508.03673 [math.CO], 2015.
- Petter Brändén, Jonathan Leake, Igor Pak, Lower bounds for contingency tables via Lorentzian polynomials, arXiv:2008.05907 [math.CO], 2020.
- I. P. Goulden, D. M. Jackson, and J. W. Reilly, The Hammond series of a symmetric function and its application to P-recursiveness, SIAM J. Algebraic Discrete Methods 4 (1983), no. 2, 179-193.
- R. C. Read, Letter to N. J. A. Sloane, Feb 04 1971 (gives initial terms of this sequence, although there are errors)
- M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements, Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970. [Annotated scanned copy]
- Index entries for sequences related to magic squares
-
a[n_] := 6^(-n) Sum[2^j 3^k n!^2 (3n - 2k - 3j)!/(j! k! (n - j - k)!^2 * 6^(n - j - k)), {j, 0, n}, {k, 0, n - j}];
a /@ Range[0, 15] (* Jean-François Alcover, Oct 15 2019, after Shanzhen Gao *)
A269742
Triangle of generalized Eulerian numbers T(n,k) = _2 read by rows, n >= 1, 0 <= k < 2*n.
Original entry on oeis.org
1, 1, 1, 1, 1, 4, 11, 4, 1, 1, 11, 72, 114, 72, 11, 1, 1, 26, 367, 1492, 2438, 1492, 367, 26, 1, 1, 57, 1630, 13992, 48965, 73120, 48965, 13992, 1630, 57, 1, 1, 120, 6680, 109538, 727982, 2169674, 3107640, 2169674, 727982, 109538, 6680, 120, 1
Offset: 1
Triangle begins:
1;
1, 1, 1;
1, 4, 11, 4, 1;
1, 11, 72, 114, 72, 11, 1;
1, 26, 367, 1492, 2438, 1492, 367, 26, 1;
1, 57, 1630, 13992, 48965, 73120, 48965, 13992, 1630, 57, 1;
...
The matrices for row n=3, k=0..2 are:
[2 0] [1 1] [0 2]
[0 2] [1 1] [2 0]
- Andrew Howroyd, Table of n, a(n) for n = 1..1600 (first 40 rows)
- Esther M. Banaian, Generalized Eulerian Numbers and Multiplex Juggling Sequences, (2016). All College Thesis Program. Paper 24.
- E. Banaian, S. Butler, C. Cox, J. Davis, J. Landgraf and S. Ponce, A generalization of Eulerian numbers via rook placements, arXiv:1508.03673 [math.CO], 2015.
- Andrew Howroyd, PARI Program
A123543
Number of connected labeled 2-regular pseudodigraphs (multiple arcs and loops allowed) of order n.
Original entry on oeis.org
0, 1, 2, 14, 201, 4704, 160890, 7538040, 462869190, 36055948320, 3474195588360, 405786523413600, 56502317464777800, 9248640671612865600, 1758505909558569771600, 384399253128691423022400, 95737858067835530264718000, 26952922550751326069548608000
Offset: 0
- R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1982.
-
b:= proc(n) option remember; `if`(n<2, 1,
n^2*b(n-1)-n*(n-1)^2*b(n-2)/2)
end:
a:= proc(n) option remember; `if`(n=0, 0, b(n)-
add(j*binomial(n, j)*b(n-j)*a(j), j=1..n-1)/n)
end:
seq(a(n), n=0..17); # Alois P. Heinz, Mar 22 2025
-
m = 16;
a681[n_] := n!*HypergeometricPFQ[{1/2, -n}, {}, -2]/2^n;
egf = Log[1 + Sum[a681[k] x^k/k!, {k, 1, m}]];
CoefficientList[egf + O[x]^m, x] Range[0, m-1]! (* Jean-François Alcover, Aug 26 2019 *)
-
seq(n)={Vec(serlaplace(log(serlaplace(exp(x/2 + O(x*x^n))/sqrt(1-x + O(x*x^n))))), -(n+1))}; \\ Andrew Howroyd, Sep 09 2018
A134648
Number of 2n X n (0,1)-matrices with row sums 2 and column sums 4.
Original entry on oeis.org
0, 1, 90, 44730, 56586600, 154700988750, 807998767676100, 7373018003758407000, 109829050417159537464000, 2532230252503738514963235000, 86574740102712303011539719750000, 4237239732072431006302896746240010000
Offset: 1
Number of 4 X 2 (0,1)-matrices: 1;
Number of 6 X 3 (0,1)-matrices: 90;
Number of 8 X 4 (0,1)-matrices: 44730;
Number of 10 X 5 (0,1)-matrices: 5658660.
- Gao, Shanzhen, and Matheis, Kenneth, Closed formulas and integer sequences arising from the enumeration of (0,1)-matrices with row sum two and some constant column sums. In Proceedings of the Forty-First Southeastern International Conference on Combinatorics, Graph Theory and Computing. Congr. Numer. 202 (2010), 45-53.
-
B:=Binomial; F:=Factorial;
f:= func< m,n,k,j | B(m, k)*B(m-k, j)*B(2*m+2*k-2*j, m+k-j)*F(m+k-j) >;
t:= func< m,n | ((-1)^m*F(n)/8^m)*(&+[(&+[f(m,n,k,j)*(-1)^(j+k)/(12)^k: k in [0..m-j]]): j in [0..m]]) >;
A134648:= func< n | F(2*n)*t(n,n)/F(n) >;
[A134648(n): n in [1..30]]; // G. C. Greubel, Oct 13 2023
-
t[m_, n_]:= t[m, n]= ((-1)^m*n!/8^m)*Sum[Binomial[m,k]*Binomial[m-k,j]*Binomial[2*m+2*k-2*j,m+k-j]*(m+k-j)!*(-1)^(j+k)/(12)^k, {j,0, m}, {k,0,m-j}];
A134648[n_]:= (2*n)!*t[n,n]/n!;
Table[A134648[n], {n,30}] (* G. C. Greubel, Oct 13 2023 *)
-
b=binomial; F=factorial;
def f(m,n,k,j): return b(m, k)*b(m-k, j)*b(2*m+2*k-2*j, m+k-j)*F(m+k-j)
def t(m,n): return ((-1)^m*F(n)/8^m)*sum(sum(f(m,n,k,j)*(-1)^(j+k)/(12)^k for k in range(m-j+1)) for j in range(m+1))
def A134648(n): return F(2*n)*t(n,n)/F(n)
[A134648(n) for n in range(1,31)] # G. C. Greubel, Oct 13 2023
A307804
Triangle T(n,k) read by rows: number of labeled 2-regular digraphs (multiple arcs and loops allowed) on n nodes with k components.
Original entry on oeis.org
1, 0, 1, 0, 2, 1, 0, 14, 6, 1, 0, 201, 68, 12, 1, 0, 4704, 1285, 200, 20, 1, 0, 160890, 36214, 4815, 460, 30, 1, 0, 7538040, 1422288, 160594, 13755, 910, 42, 1, 0, 462869190, 74416131, 7151984, 535864, 33110, 1624, 56, 1, 0, 36055948320, 5016901734, 413347787, 26821368, 1490664, 70686, 2688, 72, 1
Offset: 0
Triangle T(n,k) starts:
1;
0, 1;
0, 2, 1;
0, 14, 6, 1;
0, 201, 68, 12, 1;
0, 4704, 1285, 200, 20, 1;
0, 160890, 36214, 4815, 460, 30, 1;
0, 7538040, 1422288, 160594, 13755, 910, 42, 1;
...
-
b:= proc(n) option remember; `if`(n<2, 1,
n^2*b(n-1)-n*(n-1)^2*b(n-2)/2)
end:
a:= proc(n) option remember; `if`(n=0, 0, b(n)-
add(j*binomial(n, j)*b(n-j)*a(j), j=1..n-1)/n)
end:
g:= proc(n, k) option remember; `if`(n=0, x^k/k!,
add(g(n-j, k+1)*a(j)*binomial(n,j), j=1..n))
end:
T:= (n,k)-> coeff(g(n, 0), x, k):
seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Mar 22 2025
-
b[n_] := b[n] = If[n < 2, 1, n^2*b[n - 1] - n*(n - 1)^2*b[n - 2]/2];
a[n_] := a[n] = If[n == 0, 0, b[n] - Sum[j*Binomial[n, j]*b[n - j]*a[j], {j, 1, n - 1}]/n];
g[n_, k_] := g[n, k] = If[n == 0, x^k/k!, Sum[g[n - j, k + 1]*a[j]* Binomial[n, j], {j, 1, n}]];
T[n_, k_] := Coefficient[g[n, 0], x, k];
Table[Table[T[n, k], { k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 16 2025, after Alois P. Heinz *)
A002018
From a distribution problem.
Original entry on oeis.org
1, 1, 4, 33, 480, 11010, 367560, 16854390, 1016930880, 78124095000, 7446314383200, 862332613342200, 119261328828364800, 19415283189746043600, 3675162134109650184000, 800409618620667941886000, 198730589981586780813696000, 55800304882692417053710704000
Offset: 0
- H. Anand, V. C. Dumir and H. Gupta, A combinatorial distribution problem, Duke Math. J., 33 (1996), 757-769.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
b[n_] := Sum[(2i)!*n!^2/(2^i*i!^2*(n-i)!), {i, 0, n}]/2^n; a[n_] := n*(2n-1)*b[n-1] - n*(n-1)^2*b[n-2]; a[0]=1; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Aug 08 2012, after formula *)
A134646
Number of n X n (0,1,2)-matrices with every row sum 3 and column sum 3.
Original entry on oeis.org
0, 2, 31, 1344, 111920, 16214000, 3758757240, 1310799454720, 655551508577280, 452647176631372800, 418399785559398720000, 504669505260741099417600, 777461035821119354357452800, 1501959201213688265322501427200
Offset: 1
- Zhonghua Tan, Shanzhen Gao, Kenneth Mathies, Joshua Fallon, Counting (0,1,2)-Matrices, Congressus Numeratium, December 2008.
-
Table[Sum[Sum[(-4)^(n - alpha - beta) * 3^beta * n!^2 * (beta + 3*alpha)! / (alpha!^2 * beta! * (n - alpha - beta)! * 6^(n + alpha)), {beta, 0, n - alpha}], {alpha, 0, n}], {n, 1, 20}] (* Vaclav Kotesovec, Oct 21 2023 *)
Definition corrected and a(7) and a(8) found (by direct enumeration) by R. H. Hardin, Oct 18 2009
A172806
Number of n X n of nonnegative integers with all row and column sums equal to 4.
Original entry on oeis.org
1, 1, 5, 120, 10147, 2224955, 1047649905, 936670590450, 1455918295922650, 3680232136895819610, 14356628851597700179050, 82857993930808028192521800, 683327637694741065563262206250, 7821620120684573354895941635688250
Offset: 0
- R. H. Hardin, Table of n, a(n) for n = 0..56
- Esther M. Banaian, Generalized Eulerian Numbers and Multiplex Juggling Sequences, (2016). All College Thesis Program. Paper 24.
- M. L. Stein and P. R. Stein, Enumeration of Linear Graphs and Connected Linear Graphs up to p = 18 Points. Report LA-3775, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Oct 1967.
- M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements, Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970. [Annotated scanned copy]
Showing 1-10 of 15 results.
Comments