Prove $5^{31}13^{25}$ can be represent as $ a^2+b^2;a,b \in \mathbb{Z} $ Prove $5^{31}13^{25}$ can be represent as $ a^2+b^2;a,b \in \mathbb{Z} $
I read about complex numbers. 
Authors represent formula:
$$({a_1}^2 + {b_1}^2)({a_2}^2 + {b_2}^2)\, = \,{({a_1}{a_2} - {b_1}{b_2})^2} + \,{({a_1}{b_2} + {b_1}{a_2})^2}
% MathType!MTEF!2!1!+-
% feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
% hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
% 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9
% vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x
% fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaaiikaiaadg
% gadaWgaaWcbaGaaGymaaqabaGcdaahaaWcbeqaaiaaikdaaaGccqGH
% RaWkcaWGIbWaaSbaaSqaaiaaigdaaeqaaOWaaWbaaSqabeaacaaIYa
% aaaOGaaiykaiaacIcacaWGHbWaaSbaaSqaaiaaikdaaeqaaOWaaWba
% aSqabeaacaaIYaaaaOGaey4kaSIaamOyamaaBaaaleaacaaIYaaabe
% aakmaaCaaaleqabaGaaGOmaaaakiaacMcacaaMc8Uaeyypa0JaaGPa
% VlaacIcacaWGHbWaaSbaaSqaaiaaigdaaeqaaOGaamyyamaaBaaale
% aacaaIYaaabeaakiabgkHiTiaadkgadaWgaaWcbaGaaGymaaqabaGc
% caGGIbWaaSbaaSqaaiaaikdaaeqaaOGaaiykamaaCaaaleqabaGaaG
% OmaaaakiabgUcaRiaaykW7caGGOaGaamyyamaaBaaaleaacaaIXaaa
% beaakiaadkgadaWgaaWcbaGaaGOmaaqabaGccqGHRaWkcaWGIbWaaS
% baaSqaaiaaigdaaeqaaOGaamyyamaaBaaaleaacaaIYaaabeaakiaa
% cMcadaahaaWcbeqaaiaaikdaaaaaaa!613D!
$$
So i can show that 
$$5^{31} = {a_1}^2 + {b_1}^2$$
And it's very easy to finish. But i can't.
Or i went by the wrong way?
 A: The idea is that you reduce the exponent of $5$ to $1$, because the sum of two squares multiplied by a square is sum of squares as: $(a^2+b^2)c^2=(ac)^2+(bc)^2$. Using this method we have: $5^{31}$ is the sum of two squares because we have $5=2^2+1^2$ and hence:
$$5^{31}=5^{30}\cdot 5=\left(5^{15}\right)^2 (2^2+1^2)=\left(2\cdot 5^{15}\right)^2+\left(5^{15}\right)^2 $$
using the same method you have:
$$13^{25}= \left(3\cdot 13^{12}\right)^2+\left(2\cdot 13^{12}\right)^2 $$
and use your argument that : the sum of two squares is a square. Or you can go for it from the begining as pointed in the comment by Daniel Fischer :
$$5^{31}\cdot 13^{25} = (5\cdot 13)\cdot (5^{15}\cdot 13^{12})^2=(8^2+1^2)\cdot (5^{15}\cdot 13^{12})^2$$
A: $$5^{31}=(1+2i)^{31}(1-2i)^{31}$$
Since the first and the second factor are conjugates, this is actually a sum of two squares.
A: 
Prove that $5^{31}13^{25}$ can be represented as $ a^2+b^2,~a,b \in \mathbb{Z} $

Proving that $5^{31}13^{25}$ can be represented as the sum of two squares is not the same as offering the explicit values of a and b ! Of course, doing so would indeed settle the question, but it is not necessary.


Authors represent formula: $({a_1}^2+{b_1}^2)({a_2}^2+{b_2}^2)~=~{({a_1}{a_2}-{b_1}{b_2})^2}+\,{({a_1}{b_2}+{b_1}{a_2})^2}$

This is the famous Brahmagupta-Fibonacci identity, which basically tells us that the product of two numbers which can be written as the sum of two squares is itself the sum of two squares. By repeatedly or recursively applying this idea to the numbers $5=4+1$ and $13=9+4$, we get that $5^m13^n$ is always a sum of two squares, for all natural values of m and n. $($In this case, $m=31$ and $n=25)$.
See also Fermat's theorem on sums of two squares, which shows that all primes of the form $4k+1$ can be written as the sum of two squares. Indeed, $5=4\cdot1+1$ and $13=4\cdot3+1$. Notice also the following paragraph from the afore-mentioned article:

Since the Brahmagupta–Fibonacci identity implies that the product of two integers, each of which can be written as the sum of two squares, is itself expressible as the sum of two squares, by applying Fermat's theorem to the prime factorization of any positive integer N, we see that if all the prime factors of N congruent to $3$ modulo $4$ occur to an even exponent, then N is expressible as a sum of two squares. The converse also holds.

And also this paragraph from the first article:

when used in conjunction with one of Fermat's theorems, it proves that the product of a square and any number of primes of the form $4k+1$ is also a sum of two squares.

