3

Find all positive integers $n$ such that $1+2^n+4^n$ is a prime number.


My attempt:
Suppose that $P(n)=1+2^n+4^n$ is a prime number. Let $n=3^kl$, where $l\geq1$ and $l$ is not divisible by 3. We have $$ P(n)=1+2^{3^kl}+4^{3^kl}=1+a^l+a^{2l}=1+a+a^2+a(a^{l-1}-1)+a^2(a^{2l-2}-1), $$ where $a=2^{3^k}$. We see that $a^{t(l-1)}-1$ is divisible by $a^3-1$, and therefore divisible by $a^2+a+1$. It follows that $P(n)$ is divisible by $a^2+a+1$. This happens only if $P(n) = a^2+a+1$, i.e., $n=3^k$.

However, I am stuck on the remaining, that is, we have to find $k\geq0$ such that $P(3^k)$ is a prime number. I can verify $k=0,1,2$ fulfill.
My conjecture: for $k\geq3$, $P(3^k)$ is not a prime number. But I do not know how to prove it. Can you help me, or suggest an idea, please? Thank you very much.


Edit: Here is a similar question. But this is about proving that there exists an $n$ such that $P(n)$ is a prime number. We can show that $m=0, 1, 2$ fulfills the question. However, my question is to find all $n$ such that $P(n)$ is prime. Thus the linked solution does not solve my question.

Chivul
  • 447
  • Sorry, the second part is missing there, too, it seems. – Dietrich Burde Oct 13 '23 at 17:00
  • @DietrichBurde Yeah, we can see that such $n$ exists. But I want to find all $n$, I checked it on Wolfram alpha, and for $k=3,4,5$ the statement is wrong. Your link proves that if $n$ is not $3^m$, then $P(x)$ is not prime. This does not solve my question. Do you have any idea about this? – Chivul Oct 13 '23 at 17:28
  • @DietrichBurde We can prove that, if $n$ is not $3^m$ then $P(n)$ is not prime. But we cannot prove that if $n$ is $3^m$, then $P(n)$ is prime. – Chivul Oct 13 '23 at 17:34
  • Since $P(k)|P(3^jk)-3$ for $j\ge1$, we can't settle this by finding a prime dividing $P(3^n)$ for all sufficiently large $n$ (in particular, $3$ doesn't work). – J.G. Oct 13 '23 at 18:21
  • 1
    At least, $P(3^k)$ is not prime for $3\le k\le 9$. Perhaps it is an open question - let me look it up, if I have time. – Dietrich Burde Oct 13 '23 at 18:27
  • 1
  • In fact $4^n+2^n+1$ can only be prime if $n$ is $0,1$ or a power of $3$. 2. After $n=9$ , the next $n$ possibly giving a prime is $n=3^{15}$. This gives a number having already over $8$ miliion digits and would be rank $13$ , if it were prime. The next possible prime is far larger than the largest current known prime. 3. To rule out larger primes of this form is probably impossible.
  • – Peter Oct 16 '23 at 15:19
  • Although the prime factors for $n=3^k$ must be congruent to $1$ modulo $2n$ , I have six cases upto $k=25$ with no known prime factor : $15,18,20,22,24,25$. It seems that after $n=9$ , we get no more primes. – Peter Oct 16 '23 at 15:22
  • @Peter, what does "rank $13$" mean? $13$th largest known prime? – Gerry Myerson Oct 17 '23 at 02:23
  • @GerryMyerson Yes. – Peter Oct 17 '23 at 07:03
  • Martin Hopf proved the case $n=3^{15}$ to be composite , a factor is still not known. So , now the smallest possible case is $n=3^{18}$ which would give a new record prime. – Peter Nov 09 '23 at 16:10