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.

A321718 Number of coupled non-normal semi-magic rectangles with sum of entries equal to n.

This page as a plain text file.
%I A321718 #21 Dec 06 2024 09:07:05
%S A321718 1,1,5,9,44,123,986,5043,45832,366300,3862429,39916803,495023832,
%T A321718 6227020803,88549595295,1308012377572,21086922542349,355687428096003,
%U A321718 6427700493998229,121645100408832003,2437658338007783347,51091307195905020227,1125098837523651728389,25852016738884976640003,620752163206546966698620,15511210044577707492319496
%N A321718 Number of coupled non-normal semi-magic rectangles with sum of entries equal to n.
%C A321718 A coupled non-normal semi-magic rectangle is a nonnegative integer matrix with equal row sums and equal column sums. The common row sum may be different from the common column sum.
%C A321718 Rectangles must be of size k X m where k and m are divisors of n. This implies that a(p) = p! + 3 for p prime since the only allowable rectangles are of sizes 1 X 1, 1 X p, p X 1 and p X p. The 1 X 1 square is [p], the 1 X p and p X 1 rectangles are [1,...,1] and its transpose and the p X p squares are necessarily permutation matrices and there are p! permutation matrices of size p X p. Also, a(n) >= n! + 3 for n > 1. - _Chai Wah Wu_, Jan 15 2019
%H A321718 Max Alekseyev, <a href="/A321718/b321718.txt">Table of n, a(n) for n = 0..69</a>
%H A321718 Wikipedia, <a href="https://en.wikipedia.org/wiki/Magic_square">Magic square</a>
%F A321718 a(p) = p! + 3 for p prime. a(n) >= n! + 3 for n > 1. - _Chai Wah Wu_, Jan 15 2019
%e A321718 The a(3) = 9 coupled semi-magic rectangles:
%e A321718   [3] [1 1 1]
%e A321718 .
%e A321718   [1] [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
%e A321718   [1] [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
%e A321718   [1] [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
%t A321718 prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
%t A321718 multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
%t A321718 Table[Length[Select[multsubs[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 A321718 Cf. A006052, A120733, A271103, A319056, A321654.
%Y A321718 Cf. A321717, A321719, A321720, A321721, A321722, A321724, A321724.
%K A321718 nonn
%O A321718 0,3
%A A321718 _Gus Wiseman_, Nov 18 2018
%E A321718 a(7)-a(15) from _Chai Wah Wu_, Jan 15 2019
%E A321718 a(16)-a(19) from _Chai Wah Wu_, Jan 16 2019
%E A321718 Terms a(20) onward from _Max Alekseyev_, Dec 04 2024