A question based on prime numbers. Show that if $P$ and $8P - 1$ are prime, then $8P + 1$ is composite.
First of all I analyzed that except for the case of 2 & 3, the minimum difference between two prime numbers is always greater than or equal to 2.
Then via shrewd deduction I found that $P = 3$ satisfies the condition. But I could not find any means to generalise it. I'd appreciate some help.
 A: When you encounter such questions you should think about divisibility. The easiest way to prove something is not a prime is to show they are divisible by a prime. You have a big hint that you are being asked about three numbers, it suggests checking divisibility by 3.
Hint: What happens when you check remainder of $p$ upon division by 3? If it is divisible by $3$, it must be $3$, you can check that case manually, otherwise it can have remainders $1$ or $2$. What can you say about $8p-1$ and $8p+1$ then?
A: Hint: All prime numbers except for $2$ and $3$ are of the form $6n\pm1$. In your case, if $8p\pm1$ are both prime, then $8p=6n\iff4p=3n$. Can you conclude ?
A: Note that
$$p(8p-1)(8p+1)=64p^3-p=63p^3+p^3-p=63p^3+(p-1)p(p+1)$$
Since the product of three consecutive integers is divisible by $3$ it follows that 
$$3|p(8p-1)(8p+1)$$
Hence
$3|p$ or $3|8p-1$ or $3|8p+1$.
Moreover $8p-1$ is prime and $8p-1\geq 15$ thus we cannot have $3|8p-1$.
Case 1 $p=3$ easy to check.
Case 2 $3|8p+1$. As $8p+1 \geq 17$ we have $8p+1$ is composite.
