# logical question: prove that a number is divisible by 6

Prove that, if first and last numbers out of 3 consecutive numbers are prime, the middle number is divisible by 6.

i.e.:

say $x-1, x,$and$x+1$ are the numbers, then,

if $x-1$ and $x+1$ are prime numbers,

prove $x$ is divisible by 6.

an exception: (3, 4, 5): It is true for all but this case.

-
what about 4? 3 and 5 are prime, but 4 is clearly not divisible by 6. – Holdsworth88 Jan 18 '12 at 20:49
with that as an exception – hrishikeshp19 Jan 18 '12 at 20:51

Counterexample: the first and last of 3, 4, 5 are prime, but 4 is not divisible by 6.

EDIT: Can you show that under the hypotheses $x+1$ must be odd, so $x$ must be even? Can you show that in any three consecutive numbers at least one is a multiple of 3? Can you show that if a number is a multiple of 3 and also a multiple of 2 then it's a multiple of 6?

-
just 1 exception – hrishikeshp19 Jan 18 '12 at 20:53
Ok. I got your point. The statement cannot be true with an exception. Thanks. – hrishikeshp19 Jan 18 '12 at 21:02

Ok. Since $x-1$ and $x+1$ are prime, we must have $x$ divisible by 2. Furthermore, one of $x-1,x,x+1$ is divisible by 3. Since $x-1,x+1$ are prime, we are forced to conclude $x$ is divisble by $3$. Thus it is divisible by 6.

-
with the exception of $x-1=3$ ofcourse ;) – ratchet freak Jan 18 '12 at 20:58

HINT $\$ More generally, $\rm \ p,\ p+2\$ both coprime to $\rm6\ \Rightarrow\ p\:\equiv\: -1\ \Rightarrow\ p+1\:\equiv\: 0\pmod 6$

Proof $\rm\ \ p\:$ coprime to $\rm6\ \Rightarrow\ p\equiv \pm1\pmod 6\:.\$ $\rm {-}1 + 2 \equiv 1\:$ is coprime to $6$ but $1 + 2 \equiv 3$ isn't.

-