If n n then n 2 n^2

Algebra Level 1

True or False?

If a , b , c , a,b,c, and n n are positive integers such that n = a 2 + b 2 + c 2 , n=a^2+b^2+c^2, then there exist positive integers d , e , d,e, and f f such that n 2 = d 2 + e 2 + f 2 . n^2=d^2+e^2+f^2.

In other words, if n n is the sum of three squares of positive integers, then n 2 n^2 is also the sum of three squares of positive integers.

True False

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.

5 solutions

David Vreken
Oct 7, 2018

Let a b c a \leq b \leq c . Then if d = b 2 + c 2 a 2 d = b^2 + c^2 - a^2 , e = 2 a b e = 2ab , and f = 2 a c f = 2ac , then

n 2 n^2

= ( a 2 + b 2 + c 2 ) 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 + 2a^2b^2 + 2a^2c^2 + 2b^2c^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 = (a^4 + b^4 + c^4 - 2a^2b^2 - 2a^2c^2 + 2b^2c^2) + 4a^2b^2 + 4a^2c^2

= ( b 2 + c 2 a 2 ) 2 + ( 2 a b ) 2 + ( 2 a c ) 2 = (b^2 + c^2 - a^2)^2 + (2ab)^2 + (2ac)^2

= d 2 + e 2 + f 2 = d^2 + e^2 + f^2

which makes the statement always true .

Thank you, nice solution.

Hana Wehbi - 2 years, 8 months ago

Log in to reply

Good proof

Hassaan Saleem - 2 years ago

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)

Paul Cockburn - 2 years, 7 months ago

Log in to reply

Interesting! It's strange that 81 = 36 + 36 + 9 81 = 36 + 36 + 9 is a result of a = 3 a = \sqrt{3} , b = 3 b = \sqrt{3} , and c = 3 c = \sqrt{3} .

David Vreken - 2 years, 7 months ago

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.

Jim Derrick - 2 years, 7 months ago

Log in to reply

9 = 1 2 + 2 2 + 2 2 9 = 1^2 + 2^2 + 2^2

David Vreken - 2 years, 7 months ago

Why does d=a2+c2-b2 and why does e=2ab??

John Lowit - 2 years, 7 months ago

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.

John Rasor - 2 years, 7 months ago

Log in to reply

So it’s a massive fiddle then?

John Lowit - 2 years, 7 months ago

Log in to reply

@John Lowit I'm not sure what that means, but I'm going to add "massive fiddle" to my vernacular.

Zain Majumder - 2 years, 7 months ago

Beautiful solution.

Edward Rogers - 2 years, 7 months ago

@David Vreken same!!! i too did the same

chakravarthy b - 2 years, 3 months ago
Hana Wehbi
Oct 15, 2018

A similar solution to @David Vreken

Let n = a 2 + b 2 + c 2 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^2+b^2+c^2)^2=a^4+b^4+c^4+2a^2b^2+2a^2c^2+2b^2c^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^4+b^4+c^4+2a^2b^2-2a^2c^2-2b^2c^2)+(2ac)^2+(2bc)^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 . =(a^2+b^2-c^2)^2+(2ac)^2+(2bc)^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 a\ge b \ge c > 0 \text { so } a^2 +b^2-c^2 > 0 .

Thus, we have expressed n 2 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 (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 (a^2+b^2)^2=(a^2-b^2)^2+(2ab)^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.

Francis Kong - 2 years, 7 months ago

Log in to reply

That is difference of two squares, we need the sum of two squares.

Hana Wehbi - 2 years, 7 months ago

Why is this on Algebra Level 1 and not on a higher level of number theory instead?

Diego González - 2 years, 7 months ago

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.

Hana Wehbi - 2 years, 7 months ago

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)

Diego González - 2 years, 7 months ago
Michael Mendrin
Oct 7, 2018

Any natural number that is not of the form 4 x ( 8 y + 7 ) 4^x(8y+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 4 . Repeatedly dividing the numbers by 2 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 8 is either 1 1 or 4 4 , and never 7 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 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.

Hana Wehbi - 2 years, 8 months ago

Might want to mention Legendre's Theorem to justify your first statement.

Laurel Rogers - 2 years, 7 months ago

Log in to reply

just added that

Michael Mendrin - 2 years, 7 months ago

Log in to reply

Didn't realize you can do that! Great! I learn new things every day.

Laurel Rogers - 2 years, 7 months ago

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 n = 2^a k then n 2 = 4 a k 2 n^2 = 4^a k^2 . Since k 2 0 , 1 k^2 \equiv 0,1 or 4 mod 8 4 \text{ 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)

Antoine G - 2 years, 7 months ago

How do you write 4^2?

Antonia W - 2 years, 7 months ago

Log in to reply

Like this 4 2 4^2

Use \ then ( then 4^2 then \ then )

Try it

Michael Mendrin - 2 years, 7 months ago

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 ) 4^x (8y+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 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 n^2 can be written as the sum of three squares, but you are not showing that n 2 n^2 can be written as the sum of three positive squares.

Antoine G - 2 years, 7 months ago

Log in to reply

Is 0 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.

Michael Mendrin - 2 years, 7 months ago

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.

Antoine G - 2 years, 7 months ago

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 0 is "positive", because "positive" is defined to be anything strictly greater than 0 0 . End of that subject.

Michael Mendrin - 2 years, 7 months ago

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 \left(a^2+b^2+c^2)\right)^z where a , b , c a,b,c are positive nonzero integers AND that z z can either be 1 1 or 2 2 , and 10000 numbers of the form 4 x ( 8 y + 7 ) 4^x(8y+7) , where either x , y x,y can be 0 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 b^2+c^2=a^2 ? Then d = 0 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 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.

Michael Mendrin - 2 years, 7 months ago

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: 625 = 2 5 2 + 0 2 + 0 2 625 = 25^2 +0^2 + 0^2 , 625 = 2 4 2 + 7 2 + 0 2 625 = 24^2 +7^2 + 0^2 , 625 = 2 0 2 + 1 5 2 + 0 2 625 = 20^2 +15^2 + 0^2 , 625 = 2 0 2 + 1 5 2 + 0 2 625 = 20^2 +15^2 + 0^2 , 625 = 2 0 2 + 1 2 2 + 9 2 625 = 20^2 +12^2 + 9^2 and 625 = 1 6 2 + 1 5 2 + 1 2 2 625 = 16^2 +15^2 + 12^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 (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 a \leq b \leq c (which holds up to changing the order of the squares) which excludes a 2 = b 2 + c 2 a^2 = b^2 + c^2 . Hence his proof is fine.

Antoine G - 2 years, 7 months ago

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 (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?

Michael Mendrin - 2 years, 7 months ago

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...

Antoine G - 2 years, 7 months ago

Log in to reply

@Antoine G No, because I've found some values which are not of the form 4 x ( 8 y + 7 ) 4^x(8y+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.

Michael Mendrin - 2 years, 7 months ago

Log in to reply

@Michael Mendrin Interesting, I never heard of Waring's problem/theorem before!

Antoine G - 2 years, 7 months ago
K T
Oct 19, 2018

According to Legendre's theorem, n can either be written as n = x 2 + y 2 + z 2 n=x^2+y^2+z^2 or as n = 4 a ( 8 b + 7 ) n=4^a(8b+7) , but not both (with n,x,y,z,a,b nonnegative integers).

Suppose n 2 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 ) n^2=4^a(8b+7) . Then n 2 4 a = ( n 2 a ) 2 = ( 8 b + 7 ) \frac{n^2}{4^a}=(\frac{n}{2^a})^2=(8b+7) so that 8 b + 7 8b+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 ( \Rightarrow ) is justified (though slightly odd).

For even n, the implication symbol \Rightarrow could in fact be changed into an equivalence \Leftrightarrow because of the following: Suppose n n cannot be written as a sum of three squares, then there are a and b such that n = 4 a ( 8 b + 7 ) n=4^a(8b+7) and n 2 = ( 4 a ) 2 ( 8 b + 7 ) 2 = 4 2 a ( 8 ( 8 b 2 + 14 b + 42 / 8 ) + 7 ) = 4 2 a 1 ( 8 ( 32 b 2 + 56 b + 21 ) + 7 ) n^2=(4^a)^2(8b+7)^2= 4^{2a}(8(8b^2+14b+42/8)+7)= 4^{2a-1}(8(32b^2+56b+21)+7) , so that with a 2 = 2 a 1 a_2=2a-1 and b 2 = ( 32 b 2 + 56 b + 21 ) b_2= (32b^2+56b+21) , n 2 = 4 2 a ( 8 b 2 + 7 ) n^2=4^a_2(8b_2+7) so n 2 n^2 cannot be written as a sum of three squares. De Morgan's law converts this into:

n 2 n^2 is an even sum of 3 squares \Rightarrow n n is a sum of 3 squares .

Thank you, nice solution.

Hana Wehbi - 2 years, 7 months ago
Debasish Dhal
Oct 17, 2018

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.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...