<s>[INST] Express $ \operatorname{gcd}\left(5^{m}+7^{m}, 5^{n}+7^{n}\right) $ in terms of $m$ and $n$ 
Let $m$ be a positive integer with $\operatorname{gcd}(m, n)=1 .$ Express
  $
\operatorname{gcd}\left(5^{m}+7^{m}, 5^{n}+7^{n}\right)
$
  in terms of $m$ and $n$

My work -
let $d=\operatorname{gcd}(5^m +7^m,5^n +7^n)$ then 
$5^{2m} \equiv 7^{2m}$ mod(d)
$5^{2n} \equiv 7^{2n}$ mod(d)
and obviously $gcd(5,d)=gcd(7,d)=1$ so,
$5^{gcd(2m,2n)} \equiv 7^{gcd(2m,2n)}$ (mod d)
$5^2         \equiv 7^2$          (mod d)
$d= 1,2,3,4,6,8,12,24$
now i find values of d how to express this in terms of $m$ and $n$  ???
 [/INST] For $k$ odd we have that 
$$5^k+7^k\equiv 0\mod 3$$
and
$$5^k+7^k\equiv 5+7\equiv 4\mod 8$$
For $k$ even we have that 
$$5^k+7^k\equiv 2\mod 3$$
and
$$5^k+7^k\equiv 1+1\equiv 2\mod 8$$
From here we have that if $m,n$ are both odd(i.e. if $m+n$ is even), then $\gcd(5^m+7^m,5^n+7^n)=12$.
Otherwise, if between $m$ and $n$ there is an odd and an even number(i.e. if $n+m$ is odd), then $\gcd(5^m+7^m,5^n+7^n)=2$.
So, for $\gcd(m,n)=1$, you could express
$$\gcd(5^m+7^m,5^n+7^n)=2\cdot 
3^{(m+n+1)\%2}\cdot 2^{(m+n+1)\%2}$$
Where $a\%b$ denotes the remainder that we obtain when dividing $a÷b$.
Ps. This is clearly not a favorable answer since it doesn't seem generalizable.
</s>