How do I answer this question?
Find the largest value of $d$, and the corresponding value of $k$, for which the following theorem is true:
If all of $p, p + 2, p + 6$ and $p + 8$ are prime, then $p \equiv k \pmod d$ except in one case.
Find the value of $p$ that does not satisfy this theorem, then prove that the theorem is true in all other cases.
Thanks for any help :)