# On Sum of two squares

In this discussion I will prove the following statement:

If there exists two positive integers both of which can be written as sum of two squares of integers, then there product can also be written as sum of two squares of integers

Proof :

Let two positive integers $x$ and $y$ such that $x=a^2+b^2;y=m^2+n^2;$ where all of $a,b,m$ and $n$ are integers $\Rightarrow xy=(a^2+b^2)(m^2+n^2)$ $\Rightarrow xy=a^2m^2+b^2n^2+a^2n^2+b^2m^2$ $\Rightarrow xy=(am+bn)^2\cancel{-2abmn}+(an-bm)^2\cancel{+2abmn}$ $\Rightarrow \boxed{xy=(am+bn)^2+(an-bm)^2}$

Note by Zakir Husain
1 month, 2 weeks ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

• bulleted
• list

1. numbered
2. list

1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

> This is a quote
This is a quote
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

I have a request for you, @Zakir Husain: Can you prove this:

$p_1^n + p_2^n = p_3^n$ or $p_1^n + p_2^n \neq p_3^n$

And $p_1, p_2, p_3$ are all primes...

- 1 month, 2 weeks ago

@Yajat Shamji- What to prove?

- 1 month, 2 weeks ago

- 1 month, 2 weeks ago

If $n>2$ no solution will exist see Fermat's last theorem. If $n=2$ I have proved for that no solution exists for primes. If $n=1$ then, $p_1+p_2=p_3$ In the above equation, if all of $p_1,p_2,p_3$ are primes, Then $p_3>p_2;p_3>p_1$ therefore $p_3$ is greater than the $2_{nd}$ prime $\Rightarrow p_3>3$. $\Rightarrow p_3$ is odd $\therefore$ both $p_1,p_2$ can't be odd. Therefore one of them must be an even prime $\Rightarrow p_1=2$ (Assuming $p_2>p_1$). And if so $2=p_3-p_2 \Rightarrow p_1$ and $p_2$ are twin primes.

And according to the twin prime conjecture (not proved yet) there are infinitely many such primes.

- 1 month, 2 weeks ago

Your right arrow is in red - it should look like this: $\rightarrow$ - just de-capitalise the R.

- 1 month, 2 weeks ago

I have edited the comment

- 1 month, 2 weeks ago

Thanks. Also, can you prove for negative integers, the same thing as well?

And if all is done, make a note on it! I would appreciate it if I was the person behind the idea for the note!

- 1 month, 2 weeks ago

If you didn't care whether $n$ is integer or not, then just let me know

- 1 month, 2 weeks ago

@Yajat Shamji- Proof for $n<0$; Let $-k=n;k \in Z^+$ $p_1^n+p_2^n=p_3^n \Rightarrow \frac{1}{p_1^k}+\frac{1}{p_2^k}=\frac{1}{p_3^k}$ $\frac{p_1^k+p_2^k}{p_1^kp_2^k}=\frac{1}{p_3^k}$ ${p_1^kp_2^k}=p_3^k(p_1^k+p_2^k)$ ${p_1^k}=\frac{p_3^k(p_1^k+p_2^k)}{p_2^k} \Rightarrow p_2^k | p_3^k(p_1^2+p_2^2)$ $\Rightarrow Either :p_2^k | p_3^k \Rightarrow p_2 | p_3$ $Or : p_2^k | (p_1^k+p_2^k) \Rightarrow p_2^k | p_1^k \Rightarrow p_2 | p_1$ Both of the above statements leads us to conclude that $p_2$ will always divide either of $p_3,p_1$

$\therefore$ All of $p_1,p_2,p_3$ can't be prime

Note : $a|b$ means '$a$ divides $b$' or you may translate it as $b ≡ 0 (\mod a)$

- 1 month, 2 weeks ago

Nice! Can you make a note on this and the positive proof...

- 1 month, 2 weeks ago