Let a be a nonzero integer, $m>n>0, m,n\in \mathbb{Z}$.
(1)Prove that $\gcd(a^{2^m}+1, a^{2^n}+1)$ is either $1$ or $2$.
(2)Use this fact to prove that there are infinite number of primes.
My attempt on (1): the problem can be splitted into two cases.
If $a$ is an even number, then we only need to prove $\gcd(a^{2^m}+1,a^{2^n}+1)$ equals $1$ since odd numbers cannot have $2$ as divisor.
If $a$ is an odd number, then we only need to prove $\gcd(a^{2^m}+1, a^{2^n}+1)$ equals $2$ since $a^{2^m}+1$ and $a^{2^n}+1$ are both even.
Any hints would be appreciated!