r/mathriddles • u/stephen3141 • Oct 13 '26
Easy A magic-like square
It is possible to make 8x8 array of unique numbers such that the sum of the numbers in any 2x4 rectangle (in either orientation) is identical. For example:
┌──┬──┬──┬──┬──┬──┬──┬──┐
│ 0│23│10│29│32│55│42│61│
├──┼──┼──┼──┼──┼──┼──┼──┤
│43│60│33│54│11│28│ 1│22│
├──┼──┼──┼──┼──┼──┼──┼──┤
│ 5│18│15│24│37│50│47│56│
├──┼──┼──┼──┼──┼──┼──┼──┤
│46│57│36│51│14│25│ 4│19│
├──┼──┼──┼──┼──┼──┼──┼──┤
│16│ 7│26│13│48│39│58│45│
├──┼──┼──┼──┼──┼──┼──┼──┤
│59│44│49│38│27│12│17│ 6│
├──┼──┼──┼──┼──┼──┼──┼──┤
│21│ 2│31│ 8│53│34│63│40│
├──┼──┼──┼──┼──┼──┼──┼──┤
│62│41│52│35│30│ 9│20│ 3│
└──┴──┴──┴──┴──┴──┴──┴──┘In this square, the 2x4 rectangles all sum to 252. (Edit: Sorry this looks horrible on mobile for some reason... The important point is that it's possible.)
Is it possible to construct a 6x6 array of unique numbers such that the sum of the numbers in any 2x3 rectangle (in either orientation) is identical?
ETA: On second thought, this might be medium difficulty instead of easy. I'm not too sure, though.
2
u/minimang123 Oct 13 '26
Thoughts but no solution:
is the solution just making the long long system of equations since the sum of any pair of neighbors is equal to the sum of the pair four units away the long way? And then after you programmatically or figure out the pattern for that system of equations we realize the rank of the matrix is wrong or something in a way that the 8x8 with 2x4 is not?!<
2
u/minimang123 Oct 13 '26 edited Oct 13 '26
Answer: No, you cannot
Consider property S the statement that the sum of any 2x3 rectangle in the array of numbers is identical.
Solution: Consider any arbitrary 2x3 array of numbers ((x_11, x_12, x_13),(x_21,x_22,x_23)), and consider adding a third row (x_31,x_32,x_33) below such that the sum of the numbers of each rectangle is identical. There are three equations governing their values based on the three overlapping 2x3 boxes induced by this row's placement, and three values we are solving for, therefore the solution is unique. Therefore, any nxn array of numbers with property S is entirely generated from any 2x3 array within it. So now the solution space is constrained to being 6 dimensional rather than 36 dimensional. The question is, do any generated 6x6 arrays with property S also have all numbers unique?
Let's look specifically at a 4x4 array generated by the 2x3 matrix, and consider x_44. The three specific equations which generate any number are as follows: x(m,n) = x(m-2,n-1) + x(m-2,n-2)-x(m-1,n) (equation 1) = x(m-1,n+1) + x(m-1,n-1) - x(m-2,n) (equation 2). Either of these work to generate a number, and all isomorphic equations based on rotations or mirroring hold as well. The "three equations" are equation 1 with +, equation 1 with -, and equation 2 with +... anyways. So now, we're going to navigate to x(4,4) from x(1,1).
x(3,3) = x(1,1) + x(1,2) - x(2,3) by equation 1,
x(3,4) = x(1,2) + x(2,2) - x(3,3) by equation 1 transposed,
x(4,4) = x(2,2) + x(2,3) - x(3,4) by equation 1.
Now we solve for x(4,4) in terms of x(1,1). Let's substitute our first x(3,3) in our definition of x(3,4):
x(3,4) = x(1,2)+x(2,2) - (x(1,1)+x(1,2)-x(2,3)). Let's simplify.
x(3,4) = ~~x(1,2)~~+x(2,2)-x(1,1)-~~x(1,2)~~+x(2,3).
x(3,4) = x(2,3)+x(2,2)-x(1,1).
Now let's substitute this in for our definition of x(4,4):
x(4,4) = x(2,2) + x(2,3) - (x(2,3)+x(2,2)-x(1,1))
x(4,4) =
x(2,2) + x(2,3) - x(2,3) - x(2,2)+ x(1,1)Therefore x(4,4) = x(1,1) every time.
Given that the solutions are deterministic for any given 2x3 array, any n by n array with n greater than or equal to 4 guarantees that the numbers are not unique -- for all i,j, x(i+3,j+3) = x(i,j). The maximum area array which MIGHT have property S is 6x3. In fact, the array generated by ((3,11,17),(42,103,209)) is precisely one such array which sums to 385
I'd love to know if you had a more novel argument that appeals to symmetry or some other property rather than this brute-forced answer, though!
2
u/Fullfungo Oct 13 '26
Answer: No, it's not possible.
Because the question format is very suggestive of it, since it gives an example where it is possible. So it's probably not possible with the other parameters. Prove me wrong 😜