ITT: We find a magic square of square numbers

ITT: We find a magic square of square numbers.
There's a big price for it, €1000.

Other urls found in this thread:

multimagie.com/English/SquaresOfSquaresSearch.htm
oeis.org/A024795
youtube.com/watch?v=aQxCnmhqZko
mathpages.com/home/kmath417.htm
twitter.com/NSFWRedditVideo

What is this and what are the conditions? The magic number could be 1.

All numbers can only appear once.
A magic square is a square where all the rows, columns and diagonals add up to the same sum.

Domain?

Positive integers from 1 and up.

To start off, this matrix (when squared) have two sums that appear twice each.
49 21 81
51 13 10
19 59 39

>I remembered Parker's Square
kek

I couldn't find a 3x3 square checker

anyone ?

pen and paper, son

If you can't code you should just give up now and take what life hands you.

>There's a big price for it, €1000.
Where? Google gives me nothing.

Honestly I doubt that. Think it could be solved easily with languages operating on lists like prolog.

>implying existence

multimagie.com/English/SquaresOfSquaresSearch.htm
€1000 and a bottle of champagne.

It's not as easy as you think it is.

Don't talk about things you studied for a week like you know jack shit about them.

>languages operating on lists like prolog
>languages operating on lists
>like prolog

What about squares like this that also have a square number as the magic sum?

Were they proven to be non-existent?

Where can I collect my €1000?

Nevermind, the solution is that there aren't any

I looked at the link, and it shows that if E is the middle number, then the sum is S=3E.
If S and E are both square numbers, this implies that 3=S/E is a square of a rational number, which is impossible.

...

bugger off

>Sum equals n
Casual as fuck. Call me when you find one with n being a perfect square itself.

read

>no realizing that if a+b+c=n, a^2+b^2+c^2 may not be equal to n^2.

I also tried explaining in an email that in order for the result to be "real" it would also have to be prime, and there are no prime numbers that are also square numbers

otherwise there's too many dividends and it will never result in a finite, real number.

Precisely it's
>3x3 magic square using 7 (or why not 8, or 9) distinct squared integers

oeis.org/A024795
If a 3x3 magic square of square numbers exists, its magic sum must be one of the numbers that repeat 9 or more times in this sequence.

Hmm, nevermind that.
It's still true, but not specific enough.
That sequence contains repetitions, including repetitions with numbers recurring twice or thrice.

A few insights.

(1) Kronecker product of two vectors gives you a matrix of the form in the OP.
(2) The sum of that matrices eigenvalues (e.g. The trace) is equal to the sum of the diagonals, e.g. Our number 'n'.
(3) The one find a nearest Kronecker fractor from two vectors (say u and v) as sqrt(s)*u and sqrt(s)*v. Where 's' is the first singular value of the matrix and u, v are first column vectors of the SVD decomposition of the original matrix.

I wonder if you can make hay with those?

actually can't believe nobody has cuda the shit out of it yet

daily reminder that for 3 x 3 magic squares without repeating entries must add up to 15. If you disagree with this, construct one

Here, have a nice counterexample;
[math]\begin{bmatrix} 3 & 13 & 11 \\ 17 & 9 & 1 \\ 7 & 5 & 15 \end{bmatrix}[/math]

>that
>magic square

>no repeating entries
>all rows, columns and diagonals add up to the same sum
what is it missing?
are you talking about the boring 1 to 9 square?

youtube.com/watch?v=aQxCnmhqZko

1 to n^2 square :^3

Entries must be themselves square numbers.

>From Lee Morgenstern, USA, far extending his previous proof excluding 1: "if there is a 3x3 magic square of distinct squares, then all entries must be above 10^14."
Good luck.

yeah, the boring 1 to 9 square, the simplest of the magic squares, not what this thread is about
wrong

1 1 1
1 1 1
1 1 1

No repeating entries.

what about this?

constraints are all like A-B = 0

read this

All 0

read

5229265762932550 1076613715703360 3829691353118270

1308281276418140 3793452841074470 5202784736723760

3756864790588440 5255613363069180 1198060305466060

:D

shit, Im gonna suck you off for how you got there. I had n^4 log n solution (could be improved a bit with massive lookup tables tho) and assumed it's too bad.

The first two rows don't add up to the same number.

common bros, its just my excelshit with big numbers.. ;)

>Im gonna suck you off for how you got there
shit

creat sheet. use estimated values for a-i (eg 1,2,3,4,5,6,7,8,9).
calculate all equations a^2+b^2+c^, d^2+e^2+f^3,.... (8 equations like pcirelated blue hemmed cells)
create constraints like use solver on sum of all constrains(picrelated).
solve.
start to add contraints into solver(step by step) and solve again.
as you can see picrelated there is no need for all constraints.

is right, the sum of the first row ends in 80 while the sum of the middle row ends in 70.

i thought the people who did numerical analysis in excel were accounting/business types. isn't this discrepancy the kind of thing that you're supposed to be good at spotting?

A simple result:
Assume such a magic square exists, write A,B,C ... as short for a^2, b^2, c^2, ...
Then all 9 numbers have the same parity (i.e., either all odd or all even) so without loss of generality we can assume they are all odd by repeated dividing by 4.

Proof: Fix A,C,G and the magic square constraints determine the final sum (3(C+G)/2) as well as the other entries:
[eqn]\begin{bmatrix} A & \frac{3G+C}{2}-A & C \\ \frac{3C+G}{2}-A & \frac{C+G}{2} & A+\frac{G-C}{2} \\ G & A-\frac{G-C}{2} & C+G-A \end{bmatrix}[/eqn]

In particular C+G is even.
Assume C and G are both odd squares, hence = 1 mod 4. Then the square (C+G)/2 isn't divisible by 4 so must be odd as well. If A is even then C+G-A is also even, but the average of two even squares cannot be an odd square, contradiction. Hence A is odd. By the same logic, all the other squares are odd.
If we assume instead that C and G are both even, then C+G is divisible by 4 so the square (C+G)/2 must be even. If A is odd then so is C+G-A, and both = 1 mod 8 (proof: [2x+1]^2 = 4x[x+1]+1) but their average will necessarily be odd, contradiction. Therefore all squares are even.

no die

>Then all 9 numbers have the same parity (i.e., either all odd or all even)
This doesn't have to be true.

That's not square numbers though.

So the solution is?

Aye but S needn't be square though.

First, let's look for rational solutions. If we find one, we can scale the values up by the least common multiple of the denominators to get an
integer solution. Set A=a^2, B=b^2, etc. If we treat A,E,I and B as rational parameters, we can work around the square to get the rest.
However, it's only consistent if I=2E-A. Plugging that in, and then without loss of generality scaling so that E=1, we get the 3x3 matrix

A B 3-A-B
4-2*A-B 1 2*A+B-2
A+B-1 2-B 2-A

for which the common sum n=3. We need to make all of these elements squares. A=a^2, B=b^2 and 1=1^2 are done. We can use the standard "line intersecting the circle" technique to solve 2-b^2 = square and 2-a^2=square. This will leave 4 matrix elements left to do and parameterizations for a and b.

What do you think?

just take the root of those numbers and you've solved it

Sigh, read this

continuing... set
a=( p^2-2*p-1)/(p^2+1)
b=(-p^2-2*p+1)/(p^2+1)

seems to work! I've solved it.

Either I've made a mistake or this problem is really easy.

test it

I've made a mistake of course... We need distinct integers.

if anyone finds an actual magic square of squares, don't post it here or someone else will try to grab the price

anyway, here's what I've got, A=a^2, B=b^2

a= ( p^2-2*p-1)/(p^2+1);
b= ( q^2-2*q-1)/(q^2+1);
A=a^2
B=b^2
C=3-A-B
D=4-2*A-B
e=1
F=2*A+B-2
G=A+B-1
h= (-q^2-2*q+1)/(q^2+1);
i= (-p^2-2*p+1)/(p^2+1);

So you just (!) have to find rational p and q so C,D,F and G as above are perfect squares.

That's still impossible.

-1/12?

what would be the brute force algorithm for this?

I have access to some high performance computing and a very good background in programming

OP is a Parker square

Is this model right? Will any existing magic square fit into it?

construct a matrix, everytime you place a value, check if it's already there
if it's already there, get a new value
sum the rows, columns and diagonals
count the number of unique values in the list of sums
if it's 1, then it's a magic square
this way you can also find near-magic squares with 2 or 3 uniques
tweak this based on the findings and restrictions posted in this thread
for example, the magic square of squares does not contain a 1

>9
>1
So close to only primes.

Just solve for the system of implicit equations [math]d < c < h < i < e < a < b < g < f \cup a^2+b^2+c^2=d^2+e^2+f^2=g^2+h^2+i^2=a^2+d^2+g^2=b^2+e^2+h^2=c^2+f^2+i^2=a^2+e^2+i^2=c^2+e^2+g^2[/math] and generalize to integers if possible.

I found this proof of the impossibility of a 3x3 magic square of squares.
Can someone LaTeX it for me, please?
mathpages.com/home/kmath417.htm

That's pretty easy to understand. Why LaTeX?

isn't this impossible because r^2-s^2 is on the order of 2x-1

how the fuck are we supposed to get these numbers to add up to be the same if we aren't allowed repeats

No, it's not impossible as far as we know.

That's a little bit too complicated, don't you think?

Multiply each box by 2.

It's all Euclidean.

wtf?

how does [math]2e2[/math] being be a sum of two
squares in four different ways imply that [math]e[/math] itself is a sum of squares in
(at least) two different ways?

I tried using fermat but it turns out there is a case where a = 3 mod 4 and i = 3 mod 4 and e = 3 mod 4

how does one rule out out this case ?

easier said than done

anyone can answer this ?

Well, shit.

>if there is a 3x3 magic square of distinct squares, then all entries must be above 10^14

I wrote a script in C to solve this. I have the answer. Not gonna post since I want the money.

If you have already e-mailed the answers, then what is the threat?
>nobody gonna stop looking just cause you wrote it bwoy

Well, have you sent it to them yet?
What's the answer?

because I'm autistic