I stumbled upon this problem and thought I would try to finish it (it did not get answered in the previous post), but the part with $n$ a power of two seems rather tricky. The problem is as follows:
Let $a$ and $n$ be positive integers with $a > 1$. Prove that, if $a^n+1$ is a prime number, then $a$ is even and $n$ is a power of $2$.
Suppose $a$ is odd. Then $a=2k+1$ and therefore $a^n+1$ is even, hence not a prime. So $a$ must be even.
Now, by way of contradiction, suppose that $n$ is a power of $2$ but $a^n+1$ is composite, i.e. $$a^n+1=mk$$ for some integers $m,k$. Then $a^n=mk-1$, and since $a \mid a^n$, we must have $a \mid mk-1$. Hence $ak'=mk-1$, or $ak'+1 =mk$. I was hoping this would land a contradiction, but I can't seem to find it.
I also tried proving by contrapositive, i.e. assuming that $n$ is not a power of two and then showing that it wasn't a prime, but this did not seem to bring about much.
Any ideas?