anuttarasammyak said:
p is not multiple of 2 but OP made use of the fact that p is not multiple of 3 to deduce p^2 ##\equiv## 1 (mod 3), I think.
Maybe it helps the OP to analyze his proof in order to understand how to proofread those deductions.
Math100 said:
Homework Statement:: If ## p ## and ## p^{2}+8 ## are both prime numbers, prove that ## p^{3}+4 ## is also prime.
Condition ##(A)##: ##p## is prime
Condition ##(B)##: ##p^2+8## is prime
Conclusion ##(C)##: ##p^3+4## is prime
This is usually written as: ## (A) \wedge (B) \Longrightarrow (C)##.
An equivalent statement would be: ##\lnot (C) \Longrightarrow \lnot (A) \vee \lnot (B)##
which is in words: If ##(C)## is wrong then either ##(A)## is wrong or ##(B)## is wrong (or both). If ##p^3+8## is composite then either ##p## is composite, ##p^2+8## is composite or both are.
One of these statements has to be shown.
Math100 said:
Relevant Equations:: None.
Proof:
Suppose ## p ## and ## p^{2}+8 ## are both prime numbers.
This is the direct version of the proof, i.e. ## (A) \wedge (B) \Longrightarrow (C)##.
Math100 said:
Since ## p^{2}+8 ## is prime, it follows that ## p ## is odd, so ## p\neq 2 ##.
Since ## p^{2}+8 ## is prime and ##2^2+8=12## is not, it follows that ## p ## is odd, so ## p\neq 2 ##.
Math100 said:
Why?
Better is: If ##p=3## then ##p^3+8=17## is prime and ##p^3+4=31## is also prime. Hence the statement is true for ##p=3## and we are allowed to assume ##p>3.##
Let ##p=2k+1## with ##k>1.## (We already know that ##p## is odd, and we assume ##p>3##.)
Math100 said:
Then ## p^{2}\equiv 1 \mod 3 ##,
Why?
We have ##p^2=(2k+1)^2=4k^2+4k+1\equiv k^2+k+1 \mod 3.## In order to conclude ##p^2\equiv 1\mod 3## we have to show that ##k^2+k=k(k+1)\equiv 0 \mod 3.##
Otherwise, i.e. if ##k^2+k=k(k+1)\not\equiv 0 \mod 3## then ##3## doesn't divide ##k## nor ##k+1## which is only possible if ##k\equiv 1\mod 3 ## and ##k+1\equiv 2\mod 3.## Therefore there is an integer ##m## such that ##k=3m+1.## This means ##p=2k+1=6m+3## and ##3\,|\,p.## As ##p## is prime, we have ##p=3## which contradicts our assumption ##p>3.##
Therefore $$p^2\equiv 4k^2+k+1 \equiv k^2+k+1\equiv k(k+1)+1\equiv 0+1 \equiv 1\mod 3\,.$$
It is here, where the reader can see, why the assumption ##p>3## has been made in the first place.
Math100 said:
so ## p^{2}+8\equiv 0 \mod 3 ##.
Note that ## p^{2}+8 ## can only be prime for ## p=3 ##.
Why?
Please give us a reason. Hint: Use the fact that ##p=2k+1## and ##k^2+k\equiv 0\mod 3## as seen in the consideration above.
The rest is obsolete. We already dealt with ##p=3## and assumed ##p>3.##
_________
What did we actually prove?
We have shown that if ##p## and ##p^2+8## are both prime, then ##p=3## since otherwise we get a contradiction. So if we set
Conclusion ##(D)##: ##p=3##
then we have shown ##(A)\wedge (B) \Longrightarrow (D).##
Now clearly ##(D) \Longrightarrow (C)## since ##3^3+4=31## is prime, which proves the initial statement.
However, conclusion ##(C)## is a corollary, a present, a gift. We get it on top without any extra work since we have proven the stronger statement ##(A)\wedge (B) \Longrightarrow (D).##
These are the elaborations and considerations you must do in order to prove something. A proof is meant to convince people. In order to convince somebody, including yourself, you have to find a chain of conclusions starting with ##(A)## and ##(B)## until you end up at ##(D).## I wrote ##(D)## because this is what we get. It is much stronger than ##(C)## and we always minimize assumptions and maximize conclusions in mathematics. So ##(C)## is indeed a corollary, not the major statement.
We have actually shown ##p^2\equiv 1\mod 3## for prime numbers ##p>3.## Everything else is a variation of this basic statement. And its shortest proof would have been
$$
p^2-1=(p-1)(p+1)
$$
If ##p>3## is prime, then ##(p-1\, , \,p\, , \,p+1)## contains a number divisible by ##3## which is not ##p.##
This is left if you strip all decorations and deviations.
I gave away this long text to demonstrate what you should try to achieve with your proofs. It is almost a complete solution, so it is what you should have done.