Create a 3x3 grid of unique integers squared, each row, column, diag. must equal N

chris84567

New member
Not sure if this is the correct category, if its not sorry.

If you create a 3x3 grid of unique integers squared, each row, column and diagonal has to be equal to N.
What is one solution to this problem and what is a general solution to this problem?

 n a[SUP]2[/SUP] b[SUP]2[/SUP] c[SUP]2[/SUP] n d[SUP]2[/SUP] e[SUP]2[/SUP] f[SUP]2[/SUP] n g[SUP]2[/SUP] h[SUP]2[/SUP] i[SUP]2[/SUP] n n n n n

Using systems of equtions I was able to find that e[SUP]2[/SUP]= 1/3n.

a[SUP]2 [/SUP]+b[SUP]2 [/SUP]+c[SUP]2 [/SUP]=n
-(a[SUP]2 [/SUP]+e[SUP]2 [/SUP]+i[SUP]2 [/SUP]=n)
-(b[SUP]2 [/SUP]+e[SUP]2 [/SUP]+h[SUP]2 [/SUP]=n)
-(c[SUP]2 [/SUP]+e[SUP]2 [/SUP]+g[SUP]2 [/SUP]=n)
g[SUP]2 [/SUP]+h[SUP]2 [/SUP]+i[SUP]2 [/SUP]=n
=
-3e[SUP]2 [/SUP]=n

After this I have been able to write everything in terms of a, c and n but don't know where to go next.

 n a[SUP]2[/SUP] b[SUP]2[/SUP] c[SUP]2[/SUP] n d[SUP]2[/SUP] [SUP]1n/3[/SUP] f[SUP]2[/SUP] n g[SUP]2[/SUP] h[SUP]2[/SUP] i[SUP]2[/SUP] n n n n n

Thanks for any help you can offer.

Last edited:

j-astron

Junior Member
First thing to notice is that you have 9 unknowns, but only 8 equations. So you won't, in general, have a single unique solution. You'll probably have infinitely-many solutions.

What you did is fine. However, each equation can be used to reduce the number of variables, one at a time.

a^2 + b^2 + c^2 = n

a^2 = n - (b^2 + c^2)

In principle you could just substitute this in everywhere that you see a^2, and that variable will have been eliminated. Repeat.

chris84567

New member
In principle you could just substitute this in everywhere that you see a^2, and that variable will have been eliminated. Repeat.
I have substituted and got every thing in terms of a and c.

Im in school right now but when I get home I'll share what I got.