Let $a, d, n$ be positive integers with $2<d<2^{n+1}$, prove that $d\nmid a^{2^{n}}+1$.
I've made some preliminary observations: I hypothesize that for any $n$, $a^{2^n}+1=2\prod p$ where the $p$s are prime numbers which are all bigger than $2^n+1$.
How should I proceed?
Edit: I've come up with the following proof. Not sure if it is sound.
Suppose to the contrary that for any $2<d<2^{n+1}$, there exists $a$ such that $d\mid a^{2^n}+1$. Then clearly $(a^{2^n},d)=1$ and consequently $(a,d)=1$.
$d\mid a^{2^n}+1$ implies $a^{2^n}\equiv -1 \mod(d)$, and therefore $a^{2^{n+1}}\equiv 1 \mod(d)$. Take $h$ to be the order of $a$, then $h\mid 2^{n+1}$, which means $h$ is a power of $2$. Then consider the fact that $a^h\equiv a^{2^k} \equiv 1$ implies that $(a^h)^2 \equiv a^{2^{k+1}} \equiv 1^2 \equiv 1$ We can keep on doing this until the index is $n$, but here is the contradiction as we said above that $a^{2^n}\equiv -1 \not\equiv 1\mod(d)$. Is the proof sound? The problem is that it seems that I haven't made use of the fact that $2<d<2^{n+1}$.
Hint: Show that, if $p$ is an odd prime natural number dividing $a^{2^n}+1$, then $p=2^{n+1}k+1$ for some positive integer $k$.
Remark on the OP's Attempt: You have proven that the order of $a$ modulo $d$ must be exactly $2^{n+1}$. What does this say about $d$?