If ## p\neq5 ## is an odd prime, prove that either ## p^{2}-1 ## or....

  • Thread starter Math100
  • Start date
  • Tags
    Prime
In summary, the prime number p is divisible by 10 if and only if p is equal to 10q+r for some integers q and r.
  • #1
Math100
797
221
Homework Statement
If ## p\neq5 ## is an odd prime, prove that either ## p^{2}-1 ## or ## p^{2}+1 ## is divisible by 10.
Relevant Equations
None.
Proof:

Suppose ## p\neq5 ## is an odd prime.
Applying the Division Algorithm produces:
## p=10q+r ## where ## 0\leq r\leq 10 ##,
where there exist unique integers ## q ## and ## r ##.
Note that ## p\equiv 1, 3, 7 ## or ## 9 ## mod ## 10 ##.
This means ## p^{2}\equiv 1, -1, -1 ## or ## 1 ## mod ## 10 ##.
Then we have ## p=10q+1, p=10q+3, p=10q+7 ## or ## p=10q+9 ##.
Now we consider four cases.
Case #1: Suppose ## p=10q+1 ## for some ## q\in\mathbb{Z} ##.
Then we have ## p^{2}-1=(10q+1)^{2} -1
=100q^{2} +20q+1-1
=100q^{2}+20q
=10(10q^{2}+2q)
=10m ##,
where ## m=10q^{2} +2q ## is an integer.
Thus, ## p^{2} -1 ## is divisible by ## 10 ##.
Case #2: Suppose ## p=10q+3 ## for some ## q\in\mathbb{Z} ##.
Then we have ## p^{2} +1=(10q+3)^{2} +1
=100q^2 +60q+10
=10(10q^{2} +6q+1)
=10n ##,
where ## n=10q^{2} +6q+1 ## is an integer.
Thus, ## p^{2} +1 ## is divisible by ## 10 ##.
Case #3: Suppose ## p=10q+7 ## for some ## q\in\mathbb{Z} ##.
Then we have ## p^{2} +1=(10q+7)^{2} +1
=100q^{2} +140q+49+1
=100q^{2} +140q+50
=10(10q^{2} +14q+5)
=10r ##,
where ## r=10q^{2} +14q+5 ## is an integer.
Thus, ## p^{2} +1 ## is divisible by ## 10 ##.
Case #4: Suppose ## p=10q+9 ## for some ## q\in\mathbb{Z} ##.
Then we have ## p^{2} -1=(10q+9)^{2} -1
=100q^{2} +180q+81-1
=100q^{2} +180q+80
=10(10q^{2} +18q+8)
=10s ##,
where ## s=10q^{2} +18q+8 ## is an integer.
Thus, ## p^{2} -1 ## is divisible by ## 10 ##.
Therefore, if ## p\neq 5 ## is an odd prime, then either ## p^{2} -1 ## or ## p^{2} +1 ## is divisible by ## 10 ##.
 
Physics news on Phys.org
  • #2
We can construct a shorter and simpler proof without so many cases.
NB The latex in the following doesn't quite render properly. The symbol ##\not|## should be a diagonal stroke through (not next to) a vertical stroke, meaning "does not divide".

$$odd(p)\to 2\not|p\to 2\not|p^2\to 2|(p^2-1) \wedge 2|(p^2 +1)$$
$$prime(p)\wedge p\neq 5\to 5\not|p$$
$$5\not|(p^2-1) \to 5\not|((p-1)(p+1))\to 5\not|(p-1)\wedge 5\not|(p+1)$$
So if ##prime(p)\wedge 5\not|(p^2-1)## we know that ##5## doesn't divide ##p-1,p## or ##p+1##. What can we then say about whether it divides ##p^2-4## and what does that imply about whether it divides ##p^2+1##?
 
  • #3
Once you get to ##p^2 \equiv \pm 1~\rm (mod~10)##, can't you conclude ##p^2 \mp 1 \equiv 0~\rm (mod~10)##?
 
  • Like
Likes Math100, nuuskur and PeroK
  • #4
Math100 said:
Homework Statement:: If ## p\neq5 ## is an odd prime, prove that either ## p^{2}-1 ## or ## p^{2}+1 ## is divisible by 10.
Relevant Equations:: None.

Proof:

Suppose ## p\neq5 ## is an odd prime.
Applying the Division Algorithm produces:
## p=10q+r ## where ## 0\leq r\leq 10 ##,
where there exist unique integers ## q ## and ## r ##.
Note that ## p\equiv 1, 3, 7 ## or ## 9 ## mod ## 10 ##.
This means ## p^{2}\equiv 1, -1, -1 ## or ## 1 ## mod ## 10 ##.
This reminds me a beginner's chess game where several apparently brilliant moves lead to checkmake in one more move, But, instead of giving checkmate, the player plays some other random move and the game continues for another thirty moves!
 
  • Like
Likes Math100 and nuuskur
  • #5
Your proof is done in 6 lines.
 
  • Like
Likes Math100
  • #6
andrewkirk said:
We can construct a shorter and simpler proof without so many cases.
NB The latex in the following doesn't quite render properly. The symbol ##\not|## should be a diagonal stroke through (not next to) a vertical stroke, meaning "does not divide".

$$odd(p)\to 2\not|p\to 2\not|p^2\to 2|(p^2-1) \wedge 2|(p^2 +1)$$
$$prime(p)\wedge p\neq 5\to 5\not|p$$
$$5\not|(p^2-1) \to 5\not|((p-1)(p+1))\to 5\not|(p-1)\wedge 5\not|(p+1)$$
So if ##prime(p)\wedge 5\not|(p^2-1)## we know that ##5## doesn't divide ##p-1,p## or ##p+1##. What can we then say about whether it divides ##p^2-4## and what does that imply about whether it divides ##p^2+1##?
## 5 ## divides ## p^{2}-4 ##, and also
## 5 ## divides ## p^{2}+1 ##.
 
  • Like
Likes andrewkirk
  • #7
vela said:
Once you get to ##p^2 \equiv \pm 1~\rm (mod~10)##, can't you conclude ##p^2 \mp 1 \equiv 0~\rm (mod~10)##?
Sorry, but I do not understand ##p^2 \mp 1 \equiv 0~\rm (mod~10)##. Can you please explain what this is?
 
  • #8
Math100 said:
Sorry, but I do not understand ##p^2 \mp 1 \equiv 0~\rm (mod~10)##. Can you please explain what this is?
It comes down to ## a \equiv b ~\rm (mod m) \rightarrow a-b \equiv 0( modm)##, assuming a,b are coprime to m.
 
  • Like
Likes vela and Math100
  • #9
nuuskur said:
Your proof is done in 6 lines.
So the first 6 lines in my original proof is sufficient?
 
  • #10
Math100 said:
So the first 6 lines in my original proof is sufficient?
Just lines 1, 5, 6, plus one more to finish, I'd say.
 
  • Like
Likes Math100
  • #11
Math100 said:
Sorry, but I do not understand ##p^2 \mp 1 \equiv 0~\rm (mod~10)##. Can you please explain what this is?
That's what you had to prove. That ##p^2 -1 = 0 \ (mod \ 10)## or ##p^2 + 1 = 0 \ (mod \ 10)##. Or, using the shorthand ##\pm## for "plus or minus"; or, ##\mp## for "minus or plus", you have to show that: ##p^2 \mp 1 = 0 \ (mod \ 10)##.
 
  • Like
Likes Math100
  • #12
Math100 said:
So the first 6 lines in my original proof is sufficient?
Do you not see that you got within one step of a finished proof, but then went off at random in a different direction?
 
  • Like
Likes Math100
  • #13
PeroK said:
That's what you had to prove. That ##p^2 -1 = 0 \ (mod \ 10)## or ##p^2 + 1 = 0 \ (mod \ 10)##. Or, using the shorthand ##\pm## for "plus or minus"; or, ##\mp## for "minus or plus", you have to show that: ##p^2 \mp 1 = 0 \ (mod \ 10)##.
Okay, here's my revised proof:

Suppose ## p\neq5 ## is an odd prime.
Note that ## p\equiv1, 3, 7 ## or ## 9 ## mod ## 10 ##.
This means ## p^{2}\equiv1, -1, -1 ## or ## 1 ## mod ## 10 ##.
Now we consider two cases.
Case #1: Suppose ## p\equiv1 ## or ## 9 ## mod ## 10 ##.
Then we have ## p^{2}\equiv1 ## or ## 81 ## mod ## 10 ##.
Thus ## p^{2}-1\equiv 0 ## mod ## 10 ##.
Case #2: Suppose ## p\equiv3 ## or ## 7 ## mod ## 10 ##.
Then we have ## p^{2}\equiv 9 ## or ## 49 ## mod ## 10 ##.
Thus ## p^{2}+1\equiv 0 ## mod ## 10 ##.
Therefore, if ## p\neq5 ## is an odd prime,
then either ## p^{2}-1 ## or ## p^{2}+1 ## is divisible by ## 10 ##.
 
  • #14
Math100 said:
Okay, here's my revised proof:

Suppose ## p\neq5 ## is an odd prime.
Note that ## p\equiv1, 3, 7 ## or ## 9 ## mod ## 10 ##.
This means ## p^{2}\equiv1, -1, -1 ## or ## 1 ## mod ## 10 ##.
Now we consider two cases.
Case #1: Suppose ## p\equiv1 ## or ## 9 ## mod ## 10 ##.
Then we have ## p^{2}\equiv1 ## or ## 81 ## mod ## 10 ##.
Thus ## p^{2}-1\equiv 0 ## mod ## 10 ##.
Case #2: Suppose ## p\equiv3 ## or ## 7 ## mod ## 10 ##.
Then we have ## p^{2}\equiv 9 ## or ## 49 ## mod ## 10 ##.
Thus ## p^{2}+1\equiv 0 ## mod ## 10 ##.
Therefore, if ## p\neq5 ## is an odd prime,
then either ## p^{2}-1 ## or ## p^{2}+1 ## is divisible by ## 10 ##.
That's fine, but I would have written it less wordily as
## p^{2}\equiv1, -1, -1 ## or ## 1 ## mod ## 10 ##
## p^{2}+1\equiv2, 0, 0 ## or ## 2 ## mod ## 10 ##
## p^{2}-1\equiv0, -2, -2 ## or ## 0 ## mod ## 10 ##
either ## p^{2}-1 ## or ## p^{2}+1 \equiv0 ## mod ##10##.
 
  • Like
Likes Math100
  • #15
andrewkirk said:
NB The latex in the following doesn't quite render properly. The symbol ##\not|## should be a diagonal stroke through (not next to) a vertical stroke, meaning "does not divide".
What you used should have worked, but given that it didn't, you could use \nmid instead: ##x\nmid y##.
 
  • #16
Note that we didn't really need ##p## to be prime here.

If ##n## is odd and not divisible by ##5##, then either ##n^2 -1## or ##n^2 +1## is divisible by ##10##. It's always worth noticing this sort of thing.
 
  • Like
Likes sysprog

FAQ: If ## p\neq5 ## is an odd prime, prove that either ## p^{2}-1 ## or....

What does it mean for a number to be an "odd prime"?

An odd prime is a positive integer that is only divisible by 1 and itself, and is also an odd number (not divisible by 2).

How do I prove that either ## p^{2}-1 ## or ## p^{2}+1 ## is divisible by 4?

To prove that either ## p^{2}-1 ## or ## p^{2}+1 ## is divisible by 4, we can use the fact that for any odd prime number p, p can be written as p = 2k+1, where k is a positive integer. Substituting this into the expressions, we get ## (2k+1)^{2}-1 = 4k^{2}+4k ## and ## (2k+1)^{2}+1 = 4k^{2}+4k+2 ##. Both of these expressions are clearly divisible by 4, thus proving the statement.

Can I use proof by contradiction to prove this statement?

Yes, proof by contradiction is a valid method to prove this statement. Assume that neither ## p^{2}-1 ## nor ## p^{2}+1 ## is divisible by 4, and then show that this leads to a contradiction. This will prove that at least one of the expressions must be divisible by 4.

Is this statement only true for odd prime numbers?

Yes, this statement is only true for odd prime numbers. If p is an even number, then p can be written as p = 2k, where k is a positive integer. Substituting this into the expressions, we get ## (2k)^{2}-1 = 4k^{2}-1 ## and ## (2k)^{2}+1 = 4k^{2}+1 ##. Neither of these expressions is divisible by 4, thus the statement does not hold for even numbers.

Can I use mathematical induction to prove this statement?

Yes, mathematical induction can also be used to prove this statement. The base case would be to show that the statement holds for the first odd prime number, which is 3. Then, assuming the statement holds for some odd prime number p, we can prove that it also holds for p+2 (the next odd prime number) by showing that either ## (p+2)^{2}-1 ## or ## (p+2)^{2}+1 ## is divisible by 4. This will complete the inductive step and prove the statement for all odd prime numbers.

Back
Top