TITLE: Primes of the form $x^2 + y^2$ can only be written as $a^2 + b^2$ in one way?
QUESTION [5 upvotes]: Let $p$ be a prime number. Let $x,y,a,b$ be distinct positive integers.
If $p=x^2 + y^2$ then $p\ne a^2+b^2$.
Is this true ? If so why ? What are the proofs for this ? I know the Fibonacci identitity : http://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity ,
but I do not see how it follows.

REPLY [2 votes]: This is the basis of Eulers factorization method http://en.wikipedia.org/wiki/Euler%27s_factorization_method you can find full proof enclosed. (Brahmagupta-Fibonacci is an important part of it)
Given two different sums of square representations of a number, this produces a factorization. Euler used this to factor huge mersenne numbers and break the world record for biggest prime.