If $n$ is a positive integer such that $2^n+n^2$ is a prime number , then is it true that $6|n-3$ ?

116 Views Asked by At

If $n$ is a positive integer such that $2^n+n^2$ is a prime number , then is it true that $6|n-3$ ? Trivially $n$ cannot be even , so this leaves us only with the possibilities $n \equiv1,3,5( \mod 6) $ , but I cannot reduce the cases . Please help , Thanks in advance .

2

There are 2 best solutions below

0
On BEST ANSWER

If $n\equiv1,5\pmod 6$ then $n^2\equiv 1\pmod 6$.

On the other hand, $2^n\equiv 2$ or $4\pmod 6$ depending on $n$ is odd or even. So if $n^2\equiv 1\pmod 6$, then $$2^n+n^2\equiv 2+1\equiv 3\pmod 6$$ therefore $2^n+n^2$ is a multiple of three.

Notice the case $1^2+2^1$, that is the only exception to your statement.

1
On

$$2^{6a+1}+(6a+1)^2=64^a\cdot2+(6a+1)^2\equiv0\pmod3$$ as $64\equiv1\pmod3\implies64^a\equiv1^a$

Similarly, $$2^{6a+5}+(6a+5)^2=64^a\cdot32+36a^2+60a+25\equiv0\pmod3$$


Alternatively, if $(n,3)=1,n\equiv\pm1\pmod3\implies n^2\equiv1$

$2^n+n^2\equiv2^n+1\pmod3\iff(-1)^n+1$

Now $(-1)^n+1\equiv0\pmod3$ which is true if $n$ is odd

We need $n\equiv1\pmod2$ and $n\equiv\pm1\pmod3\implies n\equiv1,5\pmod6$