cp's OEIS Frontend

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.

A321717 Number of non-normal (0,1) semi-magic rectangles with sum of all entries equal to n.

This page as a plain text file.
%I A321717 #35 Dec 06 2024 09:08:18
%S A321717 1,1,4,8,39,122,950,5042,45594,366243,3858148,39916802,494852628,
%T A321717 6227020802,88543569808,1308012219556,21086562956045,355687428096002,
%U A321717 6427672041650478,121645100408832002,2437655776358606198,51091307191310604724,1125098543553717372868,25852016738884976640002,620752122372339473623314,15511210044577707470250243
%N A321717 Number of non-normal (0,1) semi-magic rectangles with sum of all entries equal to n.
%C A321717 A non-normal semi-magic rectangle is a nonnegative integer matrix with row sums and column sums all equal to d, for some d|n.
%C A321717 Rectangles must be of size k X m where k and m are divisors of n and k*m >= n. This implies that a(p) = p! + 2 for p prime since the only allowable rectangles are of sizes 1 X 1, 1 X p, p X 1 and p X p. There are no 1 X 1 rectangle that satisfies the condition. The 1 X p and p X 1 rectangles are [1....1] and its transpose, the p X p rectangle are necessarily permutation matrices and there are p! permutation matrices of size p X p. It also shows that a(n) >= n! + 2 for n > 1. - _Chai Wah Wu_, Jan 13 2019
%H A321717 Max Alekseyev, <a href="/A321717/b321717.txt">Table of n, a(n) for n = 0..71</a>
%H A321717 Wikipedia, <a href="https://en.wikipedia.org/wiki/Magic_square">Magic square</a>
%F A321717 a(p) = p! + 2 for p prime. a(n) >= n! + 2 for n > 1. - _Chai Wah Wu_, Jan 13 2019
%e A321717 The a(3) = 8 semi-magic rectangles:
%e A321717   [1 1 1]
%e A321717 .
%e A321717   [1] [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
%e A321717   [1] [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
%e A321717   [1] [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
%t A321717 prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
%t A321717 multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
%t A321717 Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]
%Y A321717 Cf. A006052, A007016, A068313, A101370, A120733, A271103, A319056.
%Y A321717 Cf. A321718, A321719, A321720, A321721, A321722, A321723, A321724, A321725.
%K A321717 nonn
%O A321717 0,3
%A A321717 _Gus Wiseman_, Nov 18 2018
%E A321717 a(7) from _Chai Wah Wu_, Jan 13 2019
%E A321717 a(8)-a(13) from _Chai Wah Wu_, Jan 14 2019
%E A321717 a(14)-a(15) from _Chai Wah Wu_, Jan 15 2019
%E A321717 a(16)-a(19) from _Chai Wah Wu_, Jan 16 2019
%E A321717 Terms a(20) onward from _Max Alekseyev_, Dec 04 2024