To prove this statement, we will use the definition of the Legendre symbol. The Legendre symbol is defined as follows:
For any odd prime p and any integer a, the Legendre symbol (a/p) is defined as follows:
(a/p) = 1 if a is a quadratic residue modulo p, i.e., if there exists an integer x such that x^2 ≡ a (mod p).
(a/p) = -1 if a is not a quadratic residue modulo p, i.e., if there is no integer x such that x^2 ≡ a (mod p).
Now, let’s apply this definition to our problem. We are trying to prove that (5/p) = 1 if and only if p ≡ 1 or 4 (mod 5).
If p ≡ 1 (mod 5), then we can take x = 2 to satisfy the equation x^2 ≡ 5 (mod p). Therefore, (5/p) = 1 in this case.
If p ≡ 4 (mod 5), then we can take x = 3 to satisfy the equation x^2 ≡ 5 (mod p). Therefore, (5/p) = 1 in this case as well.
Conversely, suppose that (5/p) = 1. This means that there exists an integer x such that x^2 ≡ 5 (mod p). But the only possible values for x are 2 and 3, since x must be relatively prime to p (since x^2 ≡ 5 (mod p) has a solution). Therefore, p must be congruent to 1 or 4 (mod 5), as desired.
This completes the proof.
The first claim is true because if p ≡ 1 (mod 5), then we can write p = 5k + 1 for some integer k. Substituting this into the equation x^2 ≡ 5 (mod p) gives us:
x^2 ≡ 5 (mod 5k + 1)
If we can find an x that satisfies this equation, then it will also satisfy the original equation. We can find such an x by using the property that if a ≡ b (mod m) and c ≡ d (mod m), then a + c ≡ b + d (mod m) and ac ≡ bd (mod m). Using this property, we can rewrite the equation as follows:
(x^2 – 5) ≡ 0 (mod 5k + 1)
This equation is satisfied if x^2 – 5 is a multiple of 5k + 1. We can find such an x by setting x = 2, which gives us:
2^2 – 5 = -1
-1 is congruent to -1 (mod 5k + 1) for all integers k, so 2 is a solution to the equation x^2 ≡ 5 (mod p) when p ≡ 1 (mod 5).
The second claim is true for a similar reason. If p ≡ 4 (mod 5), then we can write p = 5k + 4 for some integer k. Substituting this into the equation x^2 ≡ 5 (mod p) gives us:
x^2 ≡ 5 (mod 5k + 4)
Again, if we can find an x that satisfies this equation, then it will also satisfy the original equation. We can rewrite the equation as follows:
(x^2 – 5) ≡ 0 (mod 5k + 4)
This equation is satisfied if x^2 – 5 is a multiple of 5k + 4. We can find such an x by setting x = 3, which gives us:
3^2 – 5 = 4
4 is congruent to 0 (mod 5k + 4) for all integers k, so 3 is a solution to the equation x^2 ≡ 5 (mod p) when p ≡ 4 (mod 5).
The statement \”x^2 ≡ 5 (mod p) has a solution\” means that there exists some integer x such that x^2 is congruent to 5 modulo p.
For example, if p = 7, then the equation x^2 ≡ 5 (mod 7) has the solutions x = 2 and x = 5, since 2^2 ≡ 5 (mod 7) and 5^2 ≡ 5 (mod 7).
Now, suppose that x is not relatively prime to p. This means that there exists some positive integer d that divides both x and p. In other words, x = dk and p = dm for some positive integers k and m.
Substituting these expressions into the equation x^2 ≡ 5 (mod p), we get:
(dk)^2 ≡ 5 (mod dm)
d^2 * k^2 ≡ 5 (mod dm)
Since d divides both sides of the congruence, it follows that k^2 ≡ 5 (mod m). This means that k is a solution to the equation y^2 ≡ 5 (mod m), which has a solution since y^2 ≡ 5 (mod m) has a solution for every positive integer m.
Therefore, if x^2 ≡ 5 (mod p) has a solution, then x must be relatively prime to p.
