# gcd of $(2^{2^m} + 1 , 2^{2^n}+1) = 1$ for distinct pair of positive integers $n,m$ [duplicate]

This question already has an answer here:

I'm stuck with the following number theory problem:

Show that $(2^{2^m} + 1 , 2^{2^n}+1) = 1$ for any distinct pair of positive integers $n,m$

## marked as duplicate by lulu, MooS, Dietrich Burde, mrp, Especially LimeMay 4 '17 at 10:29

• what have you tried? do you know any statements about gcd that might be helpful here? – supinf May 4 '17 at 9:35
• Though it is interesting that the duplicate provides three answers, but none has the same approach as mine. – MooS May 4 '17 at 9:39
• @MooS Yes, this is nice. But there are more duplicates out there, probably even with your approach. – Dietrich Burde May 4 '17 at 9:40
• Yes, this seems highly likely to me :) – MooS May 4 '17 at 9:41
• @DietrichBurde, MooS Don't forget to upvote those new users.. – reuns May 4 '17 at 9:53

If $p$ is a (obviously odd) prime divisor of $2^{2^n}+1$, wee see that $2^{2^n} = -1 \mod p$ and thus $2^{2^{n+1}} = 1 \mod p$. This shows $2^{n+1}=ord_p(2)$, in particular $n$ is uniquely determined by $p$. Thus if $p$ divides $2^{2^n}+1$ and $2^{2^m}+1$ we get $n=m$.
WLOG let $m>n$ and $m=n+c, c>0$ and if $a^{2^n}+1=r$
Now $$a^{2^m}+1=(a^{2^n})^{2^c}+1=(r-1)^{2^c}+1\equiv2\pmod r$$
$$\implies\left(a^{2^m}+1,a^{2^n}+1\right)=\left(2,a^{2^n}+1\right)$$