0

Can someone help me with this? I'm not sure how to approach it.. anything would be helpful!

Prove that if $p$ is a prime number and $p\neq 3$, then $3$ divides $p^2+2$

In my textbook the hint it gives states that: when $p$ is divided by $3$, the remainder is either $0, 1$, or $2$. That is, for some integer $k, \; p=3k$ or $p=3k+1$ or $p=3k+2$.

Mnifldz
  • 12,880
  • Hi and welcome to the site! Since this is a site that encourages and helps with learning, it is best if you show your own ideas and efforts in solving the question. Can you edit your question to add your thoughts and ideas about it? Even if you think that you have 'no idea' how to proceed, writing what you have tried is helpful. – Hippalectryon Mar 05 '15 at 19:02

5 Answers5

3

The next step is to realize from your hint that since $p$ is prime (and is not $3$), it cannot be in the form $3k$. Now what happens when you square a number of the form $3k+1$ or $3k+2$?

1

Since $\gcd(p,3)=1$, Euler-Fermat tells you that $p^2\equiv1\pmod{3}$. Thus $$p^2+2\equiv1+2\equiv0\pmod{3}.$$

egreg
  • 238,574
1

Notice that $\,3\,$ divides one of the three consecutive integers $\,p-1,\, p,\, p+1,\,$
so if $\,3\nmid p\,$ then $\, 3\mid (p\!-\!1)(p\!+\!1) = p^2\!-1,\,$ so $\ 3\mid (p^2\!-1)+3 = p^2+2$

Bill Dubuque
  • 272,048
0

Note that $[p\in\mathbb{P}]\wedge[p\neq3]\implies[p=2]\vee[p\equiv1\pmod6]\vee[p\equiv5\pmod6]$.


Therefore, consider the following cases:

  • $p=2 \implies p^2+2=6 \implies 3|p^2+2$
  • $p\equiv1\pmod6 \implies p^2+2\equiv1^2+2\equiv3\pmod6 \implies 3|p^2+2$
  • $p\equiv5\pmod6 \implies p^2+2\equiv5^2+2\equiv27\equiv3\pmod6 \implies 3|p^2+2$

Clarification: $n\equiv3\pmod6\implies\exists{k}\in\mathbb{Z}:n=6k+3=3(2k+1)\implies3|n$.

barak manos
  • 43,109
0

Note $p^2+2 =(p-1)(p+1)+3$. If p is not divisible by 3, then either $(p-1)$ or $(p+1)$ is divisible by 3.