# If $n=N^2m$ for squarefree $m$, then $n$ is the sum of two squares if $m$ has no prime factor of the form $4k+3$

My question is ;

Let $$n$$ be $$n=N^{2} m$$ , where m is a squarefree integer. Then $$n$$ can be written that as a sum of two integer squares, if $$m$$ contains no prime factor of the form $$4k+3$$.

I have a reference here. Look at this solution please. And notice that m is a integer.

"Suppose that m has no prime factor of the form $$4 k+3$$ if $$m=1,$$ then $$n=N^{2}+0^{2}$$ and we are done. In the case $$m>1,le t$$ $$\mu=p_{1} p_{2} \cdots p_{r}$$ be the factorization of m into a product of distinct primes. Each of these primes $$p_{i},$$ being equal to 2 or of the form $$4 k+1,$$ can be written as a sum of two squares. Now, the identity

$$\left(a^{2}+b^{2}\right)\left(c^{2}+d^{2}\right)=(a c+b d)^{2}+(a d-b c)^{2}$$ shows that the product of two ( and any finite number by induction) integers, each of which is representable as a sum of two squares, is likewise so representable. Thus, there exist integers $$x$$ and $$y$$ satisfying $$m=x^{2}+y^{2},$$ and so $$\left.n=N^{2} m=N^{2}\left(x^{2}+y^{2}\right)=(N x)^{2}+\ (N y\right)^{2}$$ which completes the proof."

Is the solution right for this question?

And What are your different ideas? Thanks.

• Looks good as long as you assume Fermat's two-square theorem without proof. – Clement Yung Jun 26 at 1:32
• Agreed. With a little more work, you can prove it's an if-and-only-if statement. – Gerry Myerson Jun 26 at 1:34
• thanks. So what changes can i make to solution and how can i improve it? @Clement yung – robert08 Jun 26 at 1:34
• i have its proof (if and only if statement) but the question asks only one statement. so what do you suggest me else? @Gerry Myerson – robert08 Jun 26 at 1:37
• I don't think there's any way to prove it without using Fermat, or some equivalent statement about factorization in the Gaussian integers. mathoverflow.net/questions/31113/… may interest you, it refers to people.mpim-bonn.mpg.de/zagier/files/doi/10.2307/2323918/… also en.wikipedia.org/wiki/… – Gerry Myerson Jun 26 at 1:54