A321725 Irregular triangle read by rows where T(n,k) is the number of d X d non-normal semi-magic squares with d = A027750(n,k) and sum of all entries equal to n.
1, 1, 2, 1, 6, 1, 3, 24, 1, 120, 1, 4, 21, 720, 1, 5040, 1, 5, 282, 40320, 1, 55, 362880, 1, 6, 6210, 3628800, 1, 39916800, 1, 7, 120, 2008, 202410, 479001600, 1, 6227020800, 1, 8, 9135630, 87178291200, 1, 231, 153040, 1307674368000, 1, 9, 10147
Offset: 1
Examples
Triangle begins: 1 1 2 1 6 1 3 24 1 120 1 4 21 720 The T(6,2) = 4 semi-magic squares (zeros not shown): [3 ] [2 1] [1 2] [ 3] [ 3] [1 2] [2 1] [3 ] The T(6,3) = 21 semi-magic squares (zeros not shown): [2 ] [2 ] [2 ] [1 1 ] [1 1 ] [1 1 ] [1 1 ] [ 2 ] [ 1 1] [ 2] [1 1 ] [1 1] [ 1 1] [ 2] [ 2] [ 1 1] [ 2 ] [ 2] [ 1 1] [1 1] [1 1 ] . [1 1] [1 1] [1 1] [1 1] [ 2 ] [ 2 ] [ 2 ] [1 1 ] [1 1] [ 2 ] [ 1 1] [2 ] [1 1] [ 2] [ 1 1] [ 2 ] [1 1] [1 1 ] [ 2] [1 1] [2 ] . [ 1 1] [ 1 1] [ 1 1] [ 1 1] [ 2] [ 2] [ 2] [2 ] [1 1 ] [1 1] [ 1 1] [2 ] [1 1 ] [ 2 ] [ 1 1] [1 1] [1 1 ] [2 ] [ 2 ] [1 1 ] [2 ]
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..60
- Wikipedia, Magic square
- Index entries for sequences related to magic squares
Crossrefs
Programs
-
Mathematica
prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}]; multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]]; Table[Length[Select[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[k]==Union[Last/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5},{k,Divisors[n]}]
Formula
Extensions
a(15)-a(48) from Chai Wah Wu, Jan 15 2019
Edited by Peter Munn, Mar 05 2025
Comments