For any integer n greater than 1, show that $4^n+n^4$ is never a prime number.

My approach: I tried to use mathematical induction. But somehow couldn't manage to prove it. Is it to be done by induction or can it be done by another method?

  • $\begingroup$ cant this be rewritten as $4^{n+\log_4{n^4}}$ and then something about that power? Does that do anything? $\endgroup$ – Asimov Apr 30 '14 at 0:53
  • $\begingroup$ @JohnJPershing $4^{n+\log_4(n^4)} \ne 4^n+n^4$, right? $\endgroup$ – apnorton Apr 30 '14 at 0:54
  • 2
    $\begingroup$ For any even $n$ the proposition is obvious $\endgroup$ – rlartiga Apr 30 '14 at 0:54
  • $\begingroup$ @anorton Yeah, thats completely wrong now that i look back. An impulse thought that led to nothing. $\endgroup$ – Asimov Apr 30 '14 at 0:55
  • $\begingroup$ math.stackexchange.com/questions/489071/compositeness-of-n44n $\endgroup$ – user940 Apr 30 '14 at 1:04

$4^n + n^4 = (2^n)^2 + (n^2)^2 = (2^n + n^2)^2 - (2^{\frac{n+1}{2}}\cdot n)^2$. From this we use: $A^2 - B^2 = (A - B)(A + B)$ to factor the last expression and this shows it is composite when $n$ is odd. If $n$ is even it is clearly composite.


Hint $ $ If $\,n\,$ is odd then $\,\color{#c00}{n\!+\!1 = 2k}.\,$ Completing the square yields a difference of squares

$\ \ \ \begin{eqnarray} n^{\large 4}\!+ 2^{\large 2n} &\,=\,& (n^{\large 2}\!+2^{\large \color{#c00}n})^{\large 2}\!-(n2^{\large\color{#c00}k})^{\large\color{#c00} 2}\ \ \text{so, factoring this} \textit{ difference of squares}\\[.4em] &\,=\,& (n^{\large 2}\!+2^{\large n}\color{}{\ \,-\,\ n2^{\large k}})\:(n^{\large 2}\!+2^{\large n}\,+\ \color{}{n2^{\large k}})\\ \end{eqnarray}$

Note $ $ Generally $\ 2ab = c^2\,\Rightarrow\, a^2\!+b^2 = (a\!+\!b)^2\!-c^2 = (a\!+\!b\!-\!c)(a\!+\!b\!+\!c)$


This is a nice identity. Try to complete the square: $4^n+n^4=(2^n)^2+(n^2)^2=(2^n+n^2)^2-2\cdot2^n\cdot n^2$.

Now, clearly we may assume that $n$ is odd, else the sum is even and larger than $2$. But if $n$ is odd, then $2\cdot 2^n$ is itself a square, and we can continue: Say $n=2k-1$, then $(2^n+n^2)^2-2\cdot2^n\cdot n^2=(2^n+n^2-2^kn)(2^n+n^2+2^kn)$.

Finally, one just needs to check that neither term in this product is $1$. This is clear for the second term. As for the first, note that $2^n+n^2-2^kn=2^k(2^{k-1}-2k+1)+n^2$, and $2^{k-1}-2k+1\ge0$ if $2^{k-1}+1\ge 2k$, which holds for $k\ge 4$ (as one easily verifies by induction). The remaining cases $k=2,3$ can be checked directly by hand. (Note that $k=1$ corresponds to $n=1$, and $4^1+1^4=5$ is prime.)


Not the answer you're looking for? Browse other questions tagged or ask your own question.