# Divisibility Question, a bit difficult(for me). [duplicate]

Taken from An Introduction to the Theory of Numbers by Niven et al:

Prove that if $$m\gt n$$ then $$a^{2^n}+1$$ is a divisor of $$a^{2^m}-1$$. Show that if $$a,m,n$$ are positive with $$m\ne n$$, then:

$$gcd(a^{2^m}+1,a^{2^n}+1)=1$$ (if $$a$$ is even) or $$2$$ (if $$a$$ is odd)

I just got that since $$a^{2^m}-1$$ is divisible by $$a^{2^n}+1$$ it is equal to $$x(a^{2^m}+1)$$ for some integer $$x$$. But that's all I got.

P.S.: Sorry, but I'm extremely poor in Number Theory and related problem-solving. If you could suggest some methods to get better, I'd be highly obliged. And a final request, please make the answer simple such that I understand it. Thanks a lot!

## marked as duplicate by Bill Dubuque divisibility StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jul 26 at 16:37

Since a$$^{2^m}$$ is even, $$a^{2^m}$$- 1 is the difference of squares. So we have $$a^{2^m} - 1=(a^{2^{m-1}}-1)(a^{2^{m-1}}+1)$$.
Notice the first term is again a difference of squares. Continue in a similar process and you will find that $$a^{2^n}+1$$ is a factor.