Prove that if $m\not =n,a$ are positive integers then $(a^{2^n}+1,a^{2^m}+1)$ is $1$ if $a$ is even and $2$ if $a$ is odd.
I solve the problem in the following way: I assume that $m>n$ then $$a^{2^m}+1=a^{2^m}-1+2$$ With this expression if I take a divisor prime $p$ of $a^{2^n}+1$ then if $p|a^{2^m}+1$ this prime must divide 2 and the result follows.
But, how can I prove this statement without use of primes? This exercise appears before the concept of prime is introduced then I prefer do not use it.
Any idea?
Thanks!