This question already has an answer here:

I have a number, say 1885, I can prove that n can be represented as a sum of squares:

Thm: n is the sum of 2 squares IF AND ONLY IF each prime factor of n that is congruent to 3(mod4) occurs to an even power in the Prime Power Decomposition of n. 1885=5x13x29, all of which are congruent to 1(mod4)

In the question I am given that 1885 can be represented as a sum of squares in 4 distinct ways. How do I go about solving for them?


marked as duplicate by Guy Fsone, Namaste, Krish, Misha Lavrov, Robert Z Nov 26 '17 at 8:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Factorise it, and then express each prime factor as a sum of two squares. $\endgroup$ – Lord Shark the Unknown Nov 25 '17 at 18:15
  • $\begingroup$ Can you provide details for how you proved your theorem? $\endgroup$ – James Arathoon Nov 25 '17 at 18:33

The Fibonacci identity is

$$(a^2+b^2)(c^2+d^2) = (ac+bd)^2 + (ad-bc)^2 = (ac-bd)^2 + (ad+bc)^2.$$

So after you find $5=2^2+1^2$ and $13 = 3^2+2^2$ you have

$$ 65 = (2^2+1^2)(3^2+2^2) = 8^2 + 1^2 = 4^2 + 7^2.$$

Then repeat when you find $29 = 5^2+2^2.$


$1885=5\times 13\times 29$





$1885=6^2+ 43^2=11^2+ 42^2=21^2+38^2=27^2+34^2$

Hope this can be useful


Not the answer you're looking for? Browse other questions tagged or ask your own question.