A005650
Number of "magic squares" of order n (see comment line for exact definition).
Original entry on oeis.org
1, 1, 3, 7, 47, 207, 2249, 14501, 216273, 1830449, 34662523, 362983263, 8330310559, 103938238111, 2801976629841, 40574514114061, 1256354802202337, 20708839411614753, 724160187180691379, 13386284447024070647
Offset: 0
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 125, #25, A_n.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
A134645
Number of 2n X 3n (0,1,2)-matrices with every row sum 3 and column sum 2.
Original entry on oeis.org
7, 16260, 747558000, 250071339672000, 369820640830881240000, 1796185853884657144990080000, 23511842995969107700302647865600000, 720289186703359375552628986978410240000000, 46455761324619133018320834819622638940550400000000, 5809177204262302555518772962193269714031251010176000000000
Offset: 1
a(1) = 7:
111 210 (6 ways)
111 012
- Zhonghua Tan, Shanzhen Gao, Kenneth Mathies, Joshua Fallon, Counting (0,1,2)-Matrices, Congressus Numeratium, December 2008.
-
f:=proc(m,n) 6^(-m)*add( (3^i*m!*n!*(2*n-2*i)!)/ (i!*(m-i)!*(n-i)!*2^(n-i)), i=0..m); end;
-
Table[(3*n)! * (2*n)! / 288^n * Sum[(6*n - 2*i)! * 6^i / (i! * (3*n - i)! * (2*n - i)!), {i, 0, 2*n}], {n, 1, 15}] (* Vaclav Kotesovec, Oct 21 2023 *)
Table[(2/9)^n * (3*n)! * ((6*n - 1)/2)! * Hypergeometric1F1[-2*n, 1/2 - 3*n, 3/2] / Sqrt[Pi], {n, 1, 15}] (* Vaclav Kotesovec, Oct 21 2023 *)
Corrected, edited and extended with Maple program by R. H. Hardin and
N. J. A. Sloane, Oct 18 2009
A321711
Triangle T(n,k) read by rows: coefficients of polynomials P_n(t) defined in Formula section.
Original entry on oeis.org
1, 1, 0, 3, 0, 0, 11, 9, 0, 1, 53, 120, 60, 40, 9, 309, 1410, 1800, 1590, 885, 216, 2119, 16560, 39960, 55120, 52065, 29016, 7570, 16687, 202755, 801780, 1696555, 2433165, 2300403, 1326850, 357435, 148329, 2624496, 15606360, 48387024, 99650670, 141429456, 135382464, 79738800, 22040361, 1468457, 36080100, 304274880, 1323453180, 3760709526, 7493549868, 10570597800, 10199809980, 6103007505, 1721632024
Offset: 0
For n=3 we have s1 = z1 + z2 + z3, s2 = z1^2 + z2^2 + z3^2, s12 = z1*z2 + z1*z3 + z2*z3, f1 = z1^2 + z2^2 + z3^2 + t*z2*z3 + z1*(z2 + z3), f2 = z1^2 + z2^2 + z3^2 + t*z1*z3 + z2*(z1 + z3), f3 = z1^2 + z2^2 + z3^2 + t*z1*z2 + z3*(z1 + z2), [(z1*z2*z3)^2] f1*f2*f3 = 11 + 9*t + t^3, therefore P_3(t) = 11 + 9*t + t^3.
A(x;t) = 1 + x + 3*x^2 + (11 + 9*t + t^3)*x^3 + (53 + 120*t + 60*t^2 + 40*t^3 + 9*t^4)*x^4 + ...
Triangle starts:
n\k [0] [1] [2] [3] [4] [5] [6] [7]
[0] 1;
[1] 1; 0;
[2] 3; 0; 0;
[3] 11, 9, 0, 1;
[4] 53, 120, 60, 40, 9;
[5] 309, 1410, 1800, 1590, 885, 216;
[6] 2119, 16560, 39960, 55120, 52065, 29016, 7570;
[7] 16687, 202755, 801780, 1696555, 2433165, 2300403, 1326850, 357435;
[8] ...
-
P(n, t='t) = {
my(z=vector(n, k, eval(Str("z", k))),
s1=sum(k=1, #z, z[k]), s2=sum(k=1, #z, z[k]^2), s12=(s1^2 - s2)/2,
f=vector(n, k, s2 + t*(s12 - z[k]*(s1 - z[k])) + z[k]*(s1 - z[k])), g=1);
for (i=1, n, g *= f[i]; for(j=1, n, g=substpol(g, z[j]^3, 0)));
for (k=1, n, g=polcoef(g, 2, z[k]));
g;
};
seq(N) = concat([[1], [1, 0], [3, 0, 0]], apply(n->Vecrev(P(n,'t)), [3..N]));
concat(seq(9))
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
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 ].
-
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);
A383280
a(n) = (3/2)^n * Sum_{k=0..n} (1/6)^k * (2*k)! * (n-k)! * binomial(n,k)^2.
Original entry on oeis.org
1, 2, 9, 72, 954, 19980, 624510, 27420120, 1607036760, 120942324720, 11351106055800, 1298791163577600, 177888712528573200, 28728740092874421600, 5401708378739722249200, 1169716267087957140552000, 288993599402729842084464000, 80796133625685147464322528000
Offset: 0
-
a(n) = (3/2)^n*sum(k=0, n, (2*k)!*(n-k)!*binomial(n, k)^2/6^k);
-
my(N=20, x='x+O('x^N)); Vec(serlaplace(serlaplace(1/sqrt(1-x) * exp(3*x/2)))) \\ Joerg Arndt, Apr 22 2025
Comments