# Prove that the integers $x$, $x+6$, $x+12$, $x+18$, $x+24$ can only be prime if $x$ is $5$.

Prove that the integers $x$, $x+6$, $x+12$, $x+18$, $x+24$ can only be prime if $x$ is $5$.

I am very new to proofs and not completely sure of how to approach this one. I tried several different values for $x$ other than $5$ and came up with values that are not prime. However, I can't see how I could generalize this question to prove that it works if $x$ is $5$.

Help would be appreciated.

Thanks :)

• Counterexample. x=1, x+6, x+12 and x+18 are each prime. Or did you mean 'can only all be prime'? – abligh May 9 '15 at 16:43

Hint: Show that one of the numbers is a multiple of $5$. One way to do that: Write $x=5k+r$.

• What is k and r? – anonymous May 9 '15 at 12:47
• but the vote is $4$!!!!!!!!! – Dr. Sonnhard Graubner May 9 '15 at 12:52
• @anonymous $k$ is any integer and $r$ is one of the following: $0,1,2,3,4$. You can write any integer in this from (why?), then argue that exactly one of the five given expressions must be written with $r=0$. Then notice that the one with $r=0$ is a multiple of $5$, and the only multiple of $5$ which is prime is $5$. – Alice Ryhl May 9 '15 at 13:07
• @KristofferRyhl Why can you write every integer in this form (2nd sentence)? – anonymous May 9 '15 at 13:21
• @anonymous $r=0,k=0$ gives $0$. Increasing $r$ by one gives you the next integer, if $r=4$ you can get the next integer by decreasing $r$ by 4, and then increasing $k$ by 1. Remember that increasing $k$ by 1, increases the value of the expression by $5$. – Alice Ryhl May 9 '15 at 13:23

$x\bmod5=x\bmod5$
$(x+6)\bmod5=(x+1)\bmod5$
$(x+12)\bmod5=(x+2)\bmod5$
$(x+18)\bmod5=(x+3)\bmod5$
$(x+24)\bmod5=(x+4)\bmod5$

so if $x\ne5$, then $5$ must divide one of the five integers, and it can't be $5$ itself, whence it must be composite.

• What does mod mean? – anonymous May 9 '15 at 12:57
• @anonymous Maybe you should specify your level of math knowledge. Knowing about primes and proofs and being faced with the problem at hand makes it somewhat unplausible that mod and division with remainder are not available ... – Hagen von Eitzen May 9 '15 at 13:00
• @HagenvonEitzen I know basic algebra (linear equations, simultaneous, quadratics). I have worked with mod while programming however, I am not sure if it means the same thing in math. – anonymous May 9 '15 at 13:05
• @anonymous mod means modulus here. – Derek 朕會功夫 May 9 '15 at 14:38

HINT: try $x\equiv 0,1,2,3,4\mod 5$ it works only $x=5$

• what is this now? it is the same answer like above, i do not understand, sorry......... – Dr. Sonnhard Graubner May 9 '15 at 12:51
• As it's been made abundantly clear to you multiple times, posts that are of poorer quality tend to not fare as well as those of higher quality. Quality is not just a measure of the mathematical content, but also things like adherence to grammar and orthographic rules (which includes capitalization and punctuation). Your answer does not use proper English. Hagen's does. – epimorphic May 10 '15 at 16:44
• and show me an example please! – Dr. Sonnhard Graubner May 10 '15 at 17:57
• I downvoted your answer because it was "the same answer like above", that from Hagen von Eitzen, only later, and poorer quality. If you can edit it to improve your so-called hint into a full answer, I will remove my downvote. – Joffan May 11 '15 at 19:29