Computing the Legendre Symbol (2/p) for Odd Primes: A Proof and Explanation

In summary, the Legendre symbol can be easily computed for odd primes p if p is reduced modulo 8. For example, p=59 and (-1)^{(3^2-1)/8} = (-1)^{(59^2-1)/8}.
  • #1
kingwinner
1,270
0
"Let p be an odd prime, then we proved that the Legendre symbol
nt9.JPG


Note that this can be easily computed if p is reduced modulo 8.
For example, if p=59, then p3 (mod 8) and [tex](-1)^{(p^2-1)/8}[/tex] = [tex](-1)^{(3^2-1)/8}[/tex]" (quote from my textbook)
====================================

Now I don't exactly see WHY p can be reduced modulo 8 without changing the answer.
Why can we be so sure that [tex](59^2-1)/8[/tex] and [tex](3^2-1)/8[/tex] will have the same parity? How can we prove this?

Thanks for explaining!
 
Physics news on Phys.org
  • #2
kingwinner said:
Why can we be so sure that [tex](59^2-1)/8[/tex] and [tex](3^2-1)/8[/tex] will have the same parity? How can we prove this?
Isn't parity just another word for looking at the number modulo 2?
 
  • #3
Yes, but my textbook says modulo 8 which I don't understand.

59≡3 (mod 2)
=> 592≡32 (mod 2)
=> 592-1 ≡ 32-1 (mod 2)
But the trouble here is that there is no rule saying that I can multiply both sides by 1/8 (since 1/8 is not an integer)
 
  • #4
kingwinner said:
But the trouble here is that there is no rule saying that I can multiply both sides by 1/8 (since 1/8 is not an integer)
That's right. But, still, there is a rule that deals with division...

By the way, it's the parity of (p2-1)/8, not the parity of p, so maybe you should start with that?
 
  • #5
Or, I suppose, you could start with p=q mod 8 and work from there.
 
  • #6
Sorry, I don't get it...

How should I begin?
 
  • #7
I guess I should look at two cases...(p2-1)/8 is even and the other case (p2-1)/8 is odd.

(2/p)=1
<=> (p2-1)/8 is even
<=> (p2-1)/8 = 2k
<=> p2= 16k + 1
<=> p2 ≡ 1 (mod 16)

<=> p ≡ ? (mod 8) <-----------this is the step I'm stuck...

Can someone help me, please?
Thank you!
 
  • #8
Can't you just try everything?
 
  • #9
How? Can someone show me an example?

How do you go from mod 8 to mod 16??
 
  • #10
17eb39e435290b52c08e30078f40942d.png

To get the conrguence on the right hand side (i.e. precisely when (-1/p)=1), I will use the formula in the middle
(-1/p)=1 <=> (p-1)/2 is even <=> (p-1)/2 = 2k <=> p=1+4k <=> p≡1 (mod 4)

b84e4e92a3b8ac098c587cf814810b00.png

Following the same trick as above, to determine when (2/p)=1,
set [tex][(p^2 -1)/8][/tex] =2k
<=> [tex]p^2[/tex] = 16k +1
<=> [tex]p^2[/tex] ≡ 1 (mod 16)

<=> p ≡ ? (mod 8) <-----I'm stuck on this step. Can someone explain how to go from the previous step to this step?

Thanks for any help!
 
Last edited:
  • #11
If we somehow already HAVE the answer on the right hand side, then it's easy to check that [tex]\frac{p^2-1}{8}[/tex] is odd for p = 3, 5 and it's even for p = 1, 7. But to do this, we actually need to know the correct answers in the first place.

b84e4e92a3b8ac098c587cf814810b00.png

But like in my textbook, it only proved the formula in the middle, without showing the conditions on the right, and I'm looking for a way to systematically derive the conditions on the right using the formula in the middle.

Also, why should the conditions be p≡ (mod 8)? Why not p≡ (mod 16)?? (as analogy, for (-1/p), the formula has 2 in the denominator of the exponent, and we get mod 4 on the right)
Having ONLY the formula in the middle, how to figure out what "modulus" to work with when we're trying to derive the conditions on the right?


Can someone explain this, please?
Thank you!
 
  • #12
Why not p≡ (mod 16)?
Do it for that then. What do you get?
 
  • #13
We know p is an odd prime so there are only four cases which can be placed in two catagories: [tex]\pm1+8k; \pm3+8k[/tex] Of course, in some cases k could be even and represent things like 1+32k, etc.

In the first case, squaring, subtracting off 1, and dividing by 8: [tex]\frac{\pm16k +64k^2}{8}}[/tex]

This gives an even result which goes for 8k+1 and 8k +7. The second situation is negative.

The factor 8 is introduced by use of a way to get the result. It comes from the sum formula for a product series of powers of -1: 1+2++++(p-1)/2 =(p-1)/2*(p+1)/2*1/2 =(p^2-1)/8. http://www.mathreference.com/num-mod,qr12.html

_In that case we arrive at 2^(p-1)/2 = (-1)^(p^2-1)/8. Since 2^(p-1)/2 can be only +/1, and all squares are +1--which is half the cases, we have our result.
 
Last edited:

Related to Computing the Legendre Symbol (2/p) for Odd Primes: A Proof and Explanation

1. What is the Legendre Symbol (2/p)?

The Legendre Symbol (2/p) is a mathematical notation used in number theory to indicate whether a given number, 2, is a quadratic residue mod p. It is defined as:
(2/p) = 1 if p is a prime number and 2 is a quadratic residue mod p
(2/p) = -1 if p is a prime number and 2 is not a quadratic residue mod p
(2/p) = 0 if p is not a prime number.

2. How is the Legendre Symbol (2/p) calculated?

The Legendre Symbol (2/p) is calculated using Euler's Criterion, which states that:
(2/p) ≡ 2^((p-1)/2) (mod p).
This means that the Legendre Symbol (2/p) can be determined by raising 2 to the power of (p-1)/2 and taking the remainder when divided by p. If the remainder is 1, then (2/p) = 1; if the remainder is -1, then (2/p) = -1; if the remainder is 0, then (2/p) = 0.

3. What is the significance of the Legendre Symbol (2/p)?

The Legendre Symbol (2/p) is used in many number theoretic algorithms and proofs, such as the quadratic reciprocity law. It helps determine whether a given number is a quadratic residue mod p, which has important implications in many mathematical and cryptographic applications.

4. Can the Legendre Symbol (2/p) be negative?

Yes, the Legendre Symbol (2/p) can be negative. As mentioned before, if the remainder when 2^((p-1)/2) is divided by p is -1, then (2/p) = -1. This indicates that 2 is not a quadratic residue mod p, which has important implications in number theory and cryptography.

5. How is the Legendre Symbol (2/p) used in cryptography?

The Legendre Symbol (2/p) is used in many cryptographic algorithms, such as the Diffie-Hellman key exchange and the RSA encryption scheme. It helps determine whether a given number is a quadratic residue mod p, which is crucial in generating secure keys and encrypting messages.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
16
Views
2K
  • Precalculus Mathematics Homework Help
Replies
14
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
769
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
17
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
3K
Back
Top