If $n\in\mathbb N$ and $4^n+2^n+1$ is prime, prove that there exists an $m\in\mathbb N\cup\{0\}$ such that $n=3^m$. If $n\in\mathbb N$ and $4^n+2^n+1$ is prime, prove that there exists an $m\in\mathbb N\cup\{0\}$ such that $n=3^m$.
I.e. if $4^n+2^n+1$ is prime, prove that $n=3^m$, where $m\in\mathbb N\cup\{0\}$.
I don't know how I could solve this, I don't have any ideas. I know that $4^n+2^n+1$ is obviously odd. Assume $m=0$, i.e. $n=1$. Then $3$ is prime. So that doesn't disprove what we're trying to show.
So assume $m>0$. Then $4^n+2^n+1>3$, so $4^n+2^n+1$ is either $3k+1$ or $3k+2$, where $k\in\mathbb N$. So either $4^n+2^n$ or $4^n+2^n-1$ is divisible by 3. I think it's not something that could help out at solving this. Just a little observation. I don't have any ideas.

Lemma: $\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$
Proof: Several proofs can be found here

$4^n+2^n+1 = \frac{8^n-1}{2^n-1}$. Let $n=3^t \times k$, where $k$ is not divisible by $3$. The numerator becomes $8^{3^t \times k}-1 = \left( {8^{3^t}} \right) ^k-1$, which has a factor  $\left(8^{3^t}-1 \right)$.
The denominator becomes $2^{3^t \times k}-1$. By our lemma, $\gcd(8^{3^t}-1, 2^{3^t \times k}-1)$ $= \gcd(8^{3^t}-1, 8^{3^{t-1} \times k}-1)$ $ = 8^{\gcd(3^t, {3^{t-1} \times k})} - 1 = 8^{3^{t-1}}-1 = 2^{3^{t}}-1$, since $3 \nmid k$. 
We now rewrite the fraction $\frac{8^n-1}{2^n-1}$as follows: 
$$\frac{ \left( 2^{3^{t}}-1 \right) \left( {\left(2^{3^{t}}\right)}^2 + 2^{3^{t}} +1\right)  \left( {\left(8^{3^{t}}\right)}^{k-1} + {\left(8^{3^{t}}\right)}^{k-2} + ... +1\right)}{\left( 2^{3^{t}}-1 \right)  \left( {\left(2^{3^{t}}\right)}^{k-1} + {\left(2^{3^{t}}\right)}^{k-2} + ... +1\right)}$$
$\gcd\left( \left( {\left(2^{3^{t}}\right)}^2 + 2^{3^{t}} +1\right),\left( {\left(2^{3^{t}}\right)}^{k-1} + {\left(2^{3^{t}}\right)}^{k-2} + ... +1\right) \right) = 1$, so the only way the fraction cancels to a prime is when $\left( {\left(8^{3^{t}}\right)}^{k-1} + {\left(8^{3^{t}}\right)}^{k-2} + ... +1\right)$ $=\left( {\left(2^{3^{t}}\right)}^{k-1} + {\left(2^{3^{t}}\right)}^{k-2} + ... +1\right)$. This only occurs when $k=1$. Hence, $n$ is of the form $3^t$. 
