True or False?
If a , b , c , and n are positive integers such that n = a 2 + b 2 + c 2 , then there exist positive integers d , e , and f such that n 2 = d 2 + e 2 + f 2 .
In other words, if n is the sum of three squares of positive integers, then n 2 is also the sum of three squares of positive integers.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Thank you, nice solution.
The solution also works even if the initial equality doesn't hold, because the square of a negative number is the same as the square of a positive number. Changing the order of (a, b, c) may sometimes yield different solutions. Sometimes not.
Example one: (1, 2, 3) yields (12, 4, 6) and (3, 2, 1) yields (-4, 12, 6) which is effectively the same.
Example two: (1, 2, 2) yields (7, 4, 4) and (2, 1, 2) yields (1, 4, 8) which produces two solutions (neither of which are the same as the one I initially found by experimentation).
81 = 49 + 16 +16
81 = 1 + 16 + 64
81 = 36 + 36 + 9 (my trial and error solution)
Log in to reply
Interesting! It's strange that 8 1 = 3 6 + 3 6 + 9 is a result of a = 3 , b = 3 , and c = 3 .
Only seems to hold true if a, b and c are not equal. Make all three equal to 1 gives n=3. n squared =9 and there is no d, e and f that would work, whether they are equal to each other or not.
Why does d=a2+c2-b2 and why does e=2ab??
Log in to reply
Magic! He's constructing d, e, & f this way, then showing it works. Instead of "if d=b^2+c^2-a^2" he could instead say "let d=b^2+c^2-a^2". As to how he knew to do this, well, that's the magic. See Hana Wehbi's solution below, same basic idea.
Log in to reply
So it’s a massive fiddle then?
Log in to reply
@John Lowit – I'm not sure what that means, but I'm going to add "massive fiddle" to my vernacular.
Beautiful solution.
@David Vreken same!!! i too did the same
A similar solution to @David Vreken
Let n = a 2 + b 2 + c 2 .
Expand the square and rearrange:
( a 2 + b 2 + c 2 ) 2 = a 4 + b 4 + c 4 + 2 a 2 b 2 + 2 a 2 c 2 + 2 b 2 c 2
= ( a 4 + b 4 + c 4 + 2 a 2 b 2 − 2 a 2 c 2 − 2 b 2 c 2 ) + ( 2 a c ) 2 + ( 2 b c ) 2
= ( a 2 + b 2 − c 2 ) 2 + ( 2 a c ) 2 + ( 2 b c ) 2 = d 2 + e 2 + f 2 = ( a 2 + b 2 + c 2 ) 2 = n 2 .
We can assume that a ≥ b ≥ c > 0 so a 2 + b 2 − c 2 > 0 .
Thus, we have expressed n 2 as the sum of squares of three positive integers.
Remark For the sum of two squares the analogous statement is not true: ( 1 2 + 1 2 ) 2 = 4 which can't be expressed as the sum of two squares of positive integers, although an analogous identity is true:
( a 2 + b 2 ) 2 = ( a 2 − b 2 ) 2 + ( 2 a b ) 2
But a similar approach to the one above can be used to prove the sum of four and more squares.
In your two-term example a^2-b^2=0 so that didn't work.
Log in to reply
That is difference of two squares, we need the sum of two squares.
Why is this on Algebra Level 1 and not on a higher level of number theory instead?
Log in to reply
This question should be referred to staff, I can't answer it. They classify all problems in a fairly and reasonable manner.
Log in to reply
Okay, but what's your opinion? Do you actually think this problem is easy for people of lvl. 1? (It was cool, thanks for posting)
Any natural number that is not of the form 4 x ( 8 y + 7 ) is the sum of three squares. The square of the sum of any three squares is never of that form.
Legendre's Three Square Theorem
If all three squares are even, then the square of the sum of squares is divisible by 4 . Repeatedly dividing the numbers by 2 will get to the point where at least one of them is odd. Then the remainder when this square of sum of squares is divided by 8 is either 1 or 4 , and never 7 .
Edit: Antoine G has raised the objection that Legendre's Three Squares Theorem does not guarantee three non-zero squares d 2 + e 2 + f 2 , only that it guarantees three squares, any of which could be necessarily zero, which is not observing the condition that the squares be positive. For this reason, this approach needs to be withdrawn until I find out more about this theorem and whether or not it can be made applicable to this problem.
Thank you, nice solution.
Might want to mention Legendre's Theorem to justify your first statement.
Log in to reply
just added that
Log in to reply
Didn't realize you can do that! Great! I learn new things every day.
Actually, I think appealing to Legendre is not a correct way to answer this question. Indeed, using Legendre any square is the sum of three squares. Write n = 2 a k then n 2 = 4 a k 2 . Since k 2 ≡ 0 , 1 or 4 mod 8 . You get that any square is the sum of three squares.
The reason is simple, Legendre does not care if all integers are positive (try to write 4 as the sum of three positive squares). So Legendre will not allow you to answer this question (which explicitly states positive squares)
How do you write 4^2?
Log in to reply
I'm sorry to insist, but I firmly believe your solution is flawed: If you use Legende's Three square theorem then you do not get that the number can be expressed as a sum of three positive squares.
Let me make a simple example. The number 4 does not have the form 4 x ( 8 y + 7 ) . Hence according to the theorem, 4 can be written as the sum of three squares. If you search for a bit, you will see the only answer is 4 = 2 2 + 0 2 + 0 2 . Hence Legendre's Theorem cannot guarantee that the three squares are positive .
Now if in your solution you appeal to this theorem, you are only showing that n 2 can be written as the sum of three squares, but you are not showing that n 2 can be written as the sum of three positive squares.
Log in to reply
Is 0 a positive integer? Literature says "neither positive nor negative", and also, "can be considered to be either positive or negative." If we go with "not", then I'll amend my argument a bit. Will get back to that later. Once Vreken had already offered a solid proof, I didn't see a need to pursue my explanation, but I will if I have to.
The problem didn't even say that the squares need to be distinct, either.
Log in to reply
As far as I know 0 is not positive (in English). Ask a French or a German and you might get a different answer. What I am sure of is that, on this website, positive excludes 0.
Log in to reply
@Antoine G – As I said, I'll be amending my argument. Now it's a matter of checking into Legendre's Three Squares Theorem to see if it means to say three nonzero integers, i.e., not "no more than three nonzero integers". I don't plan on making a spirited argument that 0 is "positive", because "positive" is defined to be anything strictly greater than 0 . End of that subject.
Okay, I just now did a computer search of something like the first 20000 numbers of the form ( a 2 + b 2 + c 2 ) ) z where a , b , c are positive nonzero integers AND that z can either be 1 or 2 , and 10000 numbers of the form 4 x ( 8 y + 7 ) , where either x , y can be 0 . There is no match anywhere. So, emprically speaking, it's a pretty good conjecture to say that Legendre's Three Square Theorem does explain why the claim made in this problerm is true. Let me now check on "sum of three nonzero squares" that you have an objection about.
Edit: Okay, have a look at Vreken's proof. What happens if b 2 + c 2 = a 2 ? Then d = 0 , and we're back to where we were. Wehbi has more comments about this in her posted proof, but now there's more conditions being added to this, such as a > b > c , which takes this beyond Legendre's Three-Squares Theorem. At this point, with the added conditions, I'll withdraw my approach to this problem.
Log in to reply
First, you cannot say that Legendre's Three Square Theorem explains anything here. Mainly because its statement is an existential statement and the proof is not given by a unique algorithm. The reason is simple: take the number 625. There are many ways to write it as a sum of three squares: 6 2 5 = 2 5 2 + 0 2 + 0 2 , 6 2 5 = 2 4 2 + 7 2 + 0 2 , 6 2 5 = 2 0 2 + 1 5 2 + 0 2 , 6 2 5 = 2 0 2 + 1 5 2 + 0 2 , 6 2 5 = 2 0 2 + 1 2 2 + 9 2 and 6 2 5 = 1 6 2 + 1 5 2 + 1 2 2 .
The theorem does not give you a specific one. In fact, the proof of the theorem deals with a lot of different cases. It could be that the case ( a 2 + b 2 + c 2 ) 2 falls into one of the cases where one gets 3 positive squares, but I'm not sure it's true (and I don't think that it's worth checking).
But sure, since the answer to this problem is true, the theorem of Legendre will give you always at least on triplet with three nonzero squares. But that is something you can say once you answered the problem. Otherwise, you use that the answer to the problem is true in order to solve the problem (and that's not much of a solution).
Vreken's proof starts with the assumption a ≤ b ≤ c (which holds up to changing the order of the squares) which excludes a 2 = b 2 + c 2 . Hence his proof is fine.
Log in to reply
@Antoine G – Okay, Vreken's proof is fine in that it will find three nonzero squares that meets the condition. Now, let's have a closer look at Legendre's Three Squares Theorem. Why do you say, "It could be that the case ( a 2 + b 2 + c 2 ) 2 falls into one of the cases where one gets 3 positive squares, but I'm not sure it's true (and I don't think that it's worth checking)." I think it is worth checking, which is what I have been doing. Do you agree that if the word "positive" hadn't been included, then Legendre's Three Squares Theorem would be one appropriate answer to the problem?
Log in to reply
@Michael Mendrin – Of course, if the word positive would not have been there, then your answer would have been perfectly correct!
Also, I was dumb to say "I don't think it's worth checking". Of course, it's always nice to puts your hands in the details of the proof; because that's mostly how one learns something! I just meant that, since the argument of Vreken is so short, if one only wants to know the answer to the problem, then it's probably much more efforts to understand the proof of Legendre.
Do tell me if you figure out whether the proof really ensures the positivity of the numbers...
Log in to reply
@Antoine G – No, because I've found some values which are not of the form 4 x ( 8 y + 7 ) , and yet cannot be the sum of three positive squares. I haven't been able to figure out a pattern to it in order to still try to make use of that theorem through some amendment.
You could say that this theorem is a precursor to Waring's Theorem.
It's interesting that much of the literature on this theorem doesn't make a note of this.
Log in to reply
@Michael Mendrin – Interesting, I never heard of Waring's problem/theorem before!
According to Legendre's theorem, n can either be written as n = x 2 + y 2 + z 2 or as n = 4 a ( 8 b + 7 ) , but not both (with n,x,y,z,a,b nonnegative integers).
Suppose n 2 cannot be written as a sum of three squares, then there are a and b such that n 2 = 4 a ( 8 b + 7 ) . Then 4 a n 2 = ( 2 a n ) 2 = ( 8 b + 7 ) so that 8 b + 7 must be a perfect square. But that is impossible: squares are only 0,1 or 4 ( mod 8). So any square can be written as the sum of three squares, and the implication symbol ( ⇒ ) is justified (though slightly odd).
For even n, the implication symbol ⇒ could in fact be changed into an equivalence ⇔ because of the following: Suppose n cannot be written as a sum of three squares, then there are a and b such that n = 4 a ( 8 b + 7 ) and n 2 = ( 4 a ) 2 ( 8 b + 7 ) 2 = 4 2 a ( 8 ( 8 b 2 + 1 4 b + 4 2 / 8 ) + 7 ) = 4 2 a − 1 ( 8 ( 3 2 b 2 + 5 6 b + 2 1 ) + 7 ) , so that with a 2 = 2 a − 1 and b 2 = ( 3 2 b 2 + 5 6 b + 2 1 ) , n 2 = 4 2 a ( 8 b 2 + 7 ) so n 2 cannot be written as a sum of three squares. De Morgan's law converts this into:
n 2 is an even sum of 3 squares ⇒ n is a sum of 3 squares .
Thank you, nice solution.
Well, I actually didn't solve it directly but I thought that let's try this out in 2-D. I was able to prove that it works in 2-D(or with 2 numbers). I hit a dart blindfolded with the assumption that this thing works for 3-D also and I was correct.
Problem Loading...
Note Loading...
Set Loading...
Let a ≤ b ≤ c . Then if d = b 2 + c 2 − a 2 , e = 2 a b , and f = 2 a c , then
n 2
= ( a 2 + b 2 + c 2 ) 2
= a 4 + b 4 + c 4 + 2 a 2 b 2 + 2 a 2 c 2 + 2 b 2 c 2
= ( a 4 + b 4 + c 4 − 2 a 2 b 2 − 2 a 2 c 2 + 2 b 2 c 2 ) + 4 a 2 b 2 + 4 a 2 c 2
= ( b 2 + c 2 − a 2 ) 2 + ( 2 a b ) 2 + ( 2 a c ) 2
= d 2 + e 2 + f 2
which makes the statement always true .