## Prime Exponent And Square Sum

#### Problem

Given that $p$ is prime, when is $2^p + p^2$ prime?

#### Solution

For $p \gt 3$, all primes can be written in the form, $p = 6k \pm 1$.

Therefore $p^2 = 36k^2 \pm 12k + 1 \equiv 1 \mod 3$.

If $2^m \equiv 2 \mod 3$ then $2^{m+2} = 2^2 2^m \equiv 4 \times 2 = 8 \equiv 2 \mod 3$.

As $2^1 \equiv 2 \mod 3$, it follows that $2^n \equiv 2 \mod 3$ for all odd $n$.

Hence when $p \gt 3$, $2^p + p^2 \equiv 2 + 1 \equiv 0 \mod 3$, and cannot be prime.

When $p = 2$, $2^p + p^2 = 8$.
When $p = 3$, $2^p + p^2 = 17$.

That is, $2^p + p^2$ is prime only when $p = 3$.

Problem ID: 265 (05 Feb 2006)     Difficulty: 3 Star

Only Show Problem