The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A321723 Number of non-normal magic squares whose entries are all 0 or 1 and sum to n. 6
 1, 1, 0, 0, 9, 20, 96, 656, 5584, 48913, 494264, 5383552, 65103875, 840566080, 11834159652, 176621049784, 2838040416201, 48060623405312 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS A non-normal magic square is a square matrix with row sums, column sums, and both diagonals all equal to d, for some d|n. LINKS Wikipedia, Magic square FORMULA a(n) >= A007016(n) with equality if n is prime. - Chai Wah Wu, Jan 15 2019 EXAMPLE The a(4) = 9 magic squares:   [1 1]   [1 1] .   [1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]   [0 0 1 0][0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0][0 1 0 0]   [0 0 0 1][0 1 0 0][1 0 0 0][0 0 1 0][0 1 0 0][0 0 0 1][0 0 1 0][1 0 0 0]   [0 1 0 0][0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0][0 0 1 0] 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[Subsets[Tuples[Range[n], 2], {n}], And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#], SameQ@@Join[{Tr[prs2mat[#]], Tr[Reverse[prs2mat[#]]]}, Total/@prs2mat[#], Total/@Transpose[prs2mat[#]]]]&]], {n, 5}] CROSSREFS Cf. A006052, A007016, A057151, A068313, A101370, A104602, A120732, A271103, A319056, A319616. Cf. A321717, A321718, A321719, A321720, A321721, A321722. Sequence in context: A013573 A146388 A230833 * A282763 A013338 A008847 Adjacent sequences:  A321720 A321721 A321722 * A321724 A321725 A321726 KEYWORD nonn,more AUTHOR Gus Wiseman, Nov 18 2018 EXTENSIONS a(7)-a(15) from Chai Wah Wu, Jan 15 2019 a(16)-a(17) from Chai Wah Wu, Jan 16 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 19 03:38 EDT 2021. Contains 345125 sequences. (Running on oeis4.)