# If a number can be expressed as sum of $2$ squares then every factor it can be expressed as sum of two squares

Mathematics Asked by Soham Chatterjee on November 15, 2020

Lemma : If a number which can be written as a sum of two squares is divisible by a number which is not a sum of two squares, then the quotient has a factor which is not a sum of two squares. (This is Euler’s second Proposition).

Let $$a,b$$ be two relatively prime numbers. Let $$q$$ is a proper factor of $$a^2+b^2$$ and $$q$$ can not be represented as sum of $$2$$ squares. Hence $$q>2$$.

Let $$m,n$$ be 2 numbers for which $$mq,nq$$ are the closest multiples of $$q$$ to $$a,b$$ respectively. Let $$c=a-mq,d=b-nq$$. Hence $$|c|,|d| and

$$a^2+b^2=(c+mq)^2+(d+nq)^2=m^2q^2+n^2q^2+2mqc+2nqc+c^2+d^2.$$ Hence $$q$$ divides $$c^2+d^2$$. Let $$c^2+d^2=qr$$. Let $$g=gcd (c,d )$$. Now Let $$m=gcd (g,q)$$. Hence $$m$$ divides $$q,c,d$$. Hence $$m$$ divides $$a,b$$. As $$a,b$$ are relatively prime hence $$m=1$$.

Hence $$g^2$$ divides $$r$$. Let $$e=frac{c}{g} ,f=frac{d}{g},s=frac{r}{g^2}$$. Therefore $$e^2+f^2=qs.$$ Now, $$qs=e^2+f^2leq c^2+d^2 Therefore $$s

Now finally, the descent step: if $$q$$ is not the sum of two squares, then by Lemma there must be a factor $$q_{1}$$ say of $$s$$ which is not the sum of two squares. But $$q_{1} leq s and so repeating these steps we shall be able to find a strictly decreasing infinite sequence $$q, q_{1}, q_{2}, cdots$$ of positive integers which are not
themselves the sums of two squares but which divide into a sum of two relatively prime squares. since such an infinite descent is impossible, we conclude that $$q$$ must be expressible as a sum of

Now my question is: How in the last paragraph

Now finally, the descent step: if $$q$$ is not the sum of two squares, then by Lemma there must be a factor $$q_{1}$$ say of $$s$$ which is not the sum of two squares. But $$q_{1} leq s and so repeating these steps we shall be able to find a strictly decreasing infinite sequence $$q, q_{1}, q_{2}, cdots$$ of positive integers which are not
themselves the sums of two squares but which divide into a sum of two relatively prime squares. since such an infinite descent is impossible, we conclude that $$q$$ must be expressible as a sum of

How we are getting an infinite sequesnce of numbers?