We want to prove that if there exist positive integers $m,n,a$ and $b$ such that $$m^2n=a^2+b^2.$$ $m^2n=a^2+b^2,$$then n is itself the sum of two integer squares. It is easily seen that it is sufficient to prove this assertion under the hypothesis that a and b (and therefore a and n) are coprime and that n is not a square. Let t be the unique positive integer such that t^2< n<(t+1)^2. Since there are (t+1)^2>n integers of the form au+bv with 0\leq u,v\leq t, it follows that n divides the difference a(u-u')+b(v-v') of two of them. Setting x=u-u' and y=v-v' y=v-v', we then have the inequalities |x|,|y|\leq t. The integer n then divides a^2x^2-b^2y^2; since it also divides a^2y^2+b^2y^2, it divides their sum, which is equal to a^2(x^2+y^2). Now, the integrs integers a and n being coprime, it follows that n divides x^2+y^2. The inequalities 0< x^2+y^2<2n finally imply that n=x^2+y^2. 1 Dear Michael, concerning your first question, I think that Franz's proof is really in the spirit of Fermat's techniques. Concerning the second question, here is a short, elementary proof, inspired by a theorem of Thue (cf. exercice 1.2 in Franz's book Reciprocity laws). I tried to write it using only notions known to Fermat. We want to prove that if there exist positive integers m,n,a and b such that$$m^2n=a^2+b^2.$$then$n$is itself the sum of two integer squares. It is easily seen that it is sufficient to prove this assertion under the hypothesis that$a$and$b$(and therefore$a$and$n$) are coprime and that$n$is not a square. Let$t$be the unique positive integer such that$t^2< n<(t+1)^2$. Since there are$(t+1)^2>n$integers of the form$au+bv$with$0\leq u,v\leq t$, it follows that$n$divides the difference$a(u-u')+b(v-v')$of two of them. Setting$x=u-u'$and$y=v-v'$we then have the inequalities$|x|,|y|\leq t$. The integer$n$then divides$a^2x^2-b^2y^2$; since it also divides$a^2y^2+b^2y^2$, it divides their sum, which is equal to$a^2(x^2+y^2)$. Now, the integrs$a$and$n$being coprime, it follows that$n$divides$x^2+y^2$. The inequalities$0< x^2+y^2<2n$finally imply that$n=x^2+y^2\$.