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.
%I A321725 #25 Mar 05 2025 22:04:40 %S A321725 1,1,2,1,6,1,3,24,1,120,1,4,21,720,1,5040,1,5,282,40320,1,55,362880,1, %T A321725 6,6210,3628800,1,39916800,1,7,120,2008,202410,479001600,1,6227020800, %U A321725 1,8,9135630,87178291200,1,231,153040,1307674368000,1,9,10147 %N 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. %C A321725 A non-normal semi-magic square is a nonnegative integer square matrix with all row sums and column sums equal to d, for some d|n. %H A321725 Chai Wah Wu, <a href="/A321725/b321725.txt">Table of n, a(n) for n = 1..60</a> %H A321725 Wikipedia, <a href="https://en.wikipedia.org/wiki/Magic_square">Magic square</a> %H A321725 <a href="/index/Mag#magic">Index entries for sequences related to magic squares</a> %F A321725 T(n, A000005(n)) = n!. Sum_k T(n,k) = A321719(n). - _Chai Wah Wu_, Jan 15 2019 %e A321725 Triangle begins: %e A321725 1 %e A321725 1 2 %e A321725 1 6 %e A321725 1 3 24 %e A321725 1 120 %e A321725 1 4 21 720 %e A321725 The T(6,2) = 4 semi-magic squares (zeros not shown): %e A321725 [3 ] [2 1] [1 2] [ 3] %e A321725 [ 3] [1 2] [2 1] [3 ] %e A321725 The T(6,3) = 21 semi-magic squares (zeros not shown): %e A321725 [2 ] [2 ] [2 ] [1 1 ] [1 1 ] [1 1 ] [1 1 ] %e A321725 [ 2 ] [ 1 1] [ 2] [1 1 ] [1 1] [ 1 1] [ 2] %e A321725 [ 2] [ 1 1] [ 2 ] [ 2] [ 1 1] [1 1] [1 1 ] %e A321725 . %e A321725 [1 1] [1 1] [1 1] [1 1] [ 2 ] [ 2 ] [ 2 ] %e A321725 [1 1 ] [1 1] [ 2 ] [ 1 1] [2 ] [1 1] [ 2] %e A321725 [ 1 1] [ 2 ] [1 1] [1 1 ] [ 2] [1 1] [2 ] %e A321725 . %e A321725 [ 1 1] [ 1 1] [ 1 1] [ 1 1] [ 2] [ 2] [ 2] %e A321725 [2 ] [1 1 ] [1 1] [ 1 1] [2 ] [1 1 ] [ 2 ] %e A321725 [ 1 1] [1 1] [1 1 ] [2 ] [ 2 ] [1 1 ] [2 ] %t A321725 prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}]; %t A321725 multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]]; %t A321725 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]}] %Y A321725 Cf. A006052, A007016, A027750, A120732, A319056, A319616. %Y A321725 Cf. A321718, A321719, A321721, A321722, A321724. %K A321725 nonn,tabf %O A321725 1,3 %A A321725 _Gus Wiseman_, Nov 18 2018 %E A321725 a(15)-a(48) from _Chai Wah Wu_, Jan 15 2019 %E A321725 Edited by _Peter Munn_, Mar 05 2025