If $n > 1$ is an integer not of the form $6k + 3$, prove that $n^{2} + 2^{n}$ is composite. I try to divide in to $5$ case $6k, 6k+1, 6k+2, 6k+4, 6k+5$
and put them in $n^{2}$ and consider the possible last digit 0f $2^n$
and sum with those form
I can only prove $6k, 6k+2, 6k+4$ case .the last digit is even number and can divide by $2$.
But I can't prove $6k+1, 6k+5$ case because might be odd and not guarantee Ican divide by some numbers 
Anyone can help me by give a hint ?
 A: The hint is $n > 1$. When $n = 1$, $n^2 + 2^n = 3$ which is prime. This hints that $n^2 + 2^n$ may be divisible by $3$.
We know that $6k+1$ can be written as $3(2k)+1$ and $6k+5$ can be written as $3(2k+1)+2$. Thus if $n$ is of the form $6k+1$ or $6k+5$, then $n^2 \equiv 1\pmod3$. 
The next part is to prove that $2^n \equiv 2 \pmod 3$ if $n$ is of such form. Notice that $2^0 \equiv 1 \pmod 3$, $2^1 \equiv 2 \pmod 3$ and $2^2 \equiv 1 \pmod 3$. Thus for all $k \ge 0$, $2^{2k+1} \equiv 2 \pmod 3$. Since $6k+1$ can be written as $2(3k)+1$ and $6k+5$ can be written as $2(3k+2)+1$, $2^n \equiv 2 \pmod 3$.
Thus  $n^2 + 2^n \equiv 1+2 \pmod 3 \equiv 0 \pmod 3$. This implies that $n^2 + 2^n$ is divisible by 3 if $n = 6k+1$ or $n = 6k+5$.
A: $n = 6k + i$.  If $i$ is even then $n$ is even and $n^2 + 2^n$ is even and as $n^2 + 2^n > 2$ it must be composite.
So it remains to check for $n = 6k \pm 1$.
$(6k \pm 1)^2 + 2^n = 36k^2 \pm 12k + (1 + 2^n)$.
$3|36k^2 \pm 12k$ so if we can show $3|1+2^n$ we are done as $3|n^2 + 2^n$ and as $n^2 + 2^n > 3$ if $n > 1$.
We see $3|1+2^1, 1+2^3, 1+2^5...$ but $3\not \mid 1+2^0, 1+2^2, 1+2^4,...$ so it really looks like $3|1 + 2^{odd}$ which is the case for $n= 6k \pm 1$.
That really seems familiar...  we can maybe search it.  ... Or we can just do it ourselves.
$2^{2m + 1} +1 = 2^{2m}2 + 1 = 4^m*2 + 1$ and $4^m*2 + 1 \equiv 1^m*2 + 1 \equiv 0 \mod 3$.
So... that's there...  $3|2^{odd} + 1$ so...
Case 1-3: $n = 6k + 0,2,4$ then $2|n^2 + 2^n$ and as $n> 0$, $n^2 + 2^n \ne 2$.
Case 4,5: $n = 6k +1,5$ then $3|n^2 + 2^n$ as $n$ is odd. And as $n > 1$, $n^2 + 2^n \ne 3$.
Case 6: $n = 6k + 3$, then $n^2 + 2^n$ may or may not be prime.  We weren't asked to check.
