Legendre symbol sum

Let ( a p ) \left( \dfrac{a}{p}\right) denote the Legendre symbol . If p = 163 , p=163, what is the value of

a = 1 p ( a p ) ? \sum_{a=1}^{p} \left( \dfrac{a}{p} \right)?

-1 0 1 81

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Jake Lai
Jan 26, 2016

Since ( p p ) = 0 \left( \dfrac{p}{p} \right) = 0 , the desired sum is equal to a = 1 p 1 ( a p ) \displaystyle \sum_{a=1}^{p-1} \left( \frac{a}{p} \right) .

Observe that every term ( a p ) \left( \dfrac{a}{p} \right) is paired up with a term ( p a p ) = ( a p ) = ( 1 p ) ( a p ) \left( \dfrac{p-a}{p} \right) = \left( \dfrac{-a}{p} \right) = \left( \dfrac{-1}{p} \right) \left( \dfrac{a}{p} \right) . Because a ( p 1 ) / 2 ( a p ) ( m o d p ) a^{(p-1)/2} \equiv \left( \dfrac{a}{p} \right) \pmod{p} , and here p = 163 is in the form 4k+3, ( 1 p ) ( a p ) = ( 1 ) ( p 1 ) / 2 ( a p ) = ( a p ) \left( \dfrac{-1}{p} \right) \left( \dfrac{a}{p} \right) = (-1)^{(p-1)/2} \left( \dfrac{a}{p} \right) = -\left( \dfrac{a}{p} \right) .

Hence, the total sum is 0.

Moderator note:

More generally, we can take any non-quadratic residue, and not just 1 -1 which works only for primes of the form 4 k + 3 4k+3 .

Nice. I should have chosen a prime congruent to 1 1 mod 4 4 so this argument didn't work. What if I change p p to 173 173 instead?

Patrick Corn - 5 years, 4 months ago

Log in to reply

My thinking is that the answer will be 0 0 for all odd primes p p since there are exactly p 1 2 \dfrac{p-1}2 quadratic residues modulo odd prime p p in { 1 , 2 , , p 1 } \{1,2,\ldots,p-1\} and the rest are quadratic non-residues, so,

a = 1 p ( a p ) = a = 1 p 1 ( a p ) = p 1 2 1 + p 1 2 ( 1 ) = 0 p P > 2 \sum_{a=1}^p\left(\frac ap\right)=\sum_{a=1}^{p-1}\left(\frac ap\right)=\frac{p-1}{2}\cdot 1 + \frac{p-1}2\cdot (-1) = 0\quad\forall~p\in\Bbb{P_{\gt 2}}

Prasun Biswas - 5 years, 4 months ago
Abhishek Sinha
Feb 2, 2017

Follows by a simple counting argument. First of all, note that barring p p , there are an even number of residues (or equivalence classes) { 1 , 2 , , p 1 } \{1,2, \ldots, p-1\} , modulo any odd prime p p . Now a residue q q can be paired up with p q p-q , both of which produces the same quadratic residue q 2 m o d ( p ) q^2 \mod (p) . Since p p is prime, it ensures that the quadratic residues produced in this way are distinct. Hence, there are exactly p 1 2 \frac{p-1}{2} quadratic residues and an equal number of quadratic non-residues. Hence, a = 1 p ( a p ) = p 1 2 p 1 2 = 0. \sum_{a=1}^{p} \left( \frac{a}{p} \right) = \frac{p-1}{2}- \frac{p-1}{2}= 0.

did the same!

Mr. Krabs - 2 months ago
Jesse Nieminen
Feb 3, 2016

Since ( 163 163 ) = 0 \left( \dfrac{163}{163} \right) = 0 , we need to find sum of even amount of odd numbers. Therefore the answer is 0, because it is the only even number available :P (I know how to solve it properly)

You should also present the proper solution.

Calvin Lin Staff - 5 years, 3 months ago

The thing is :

there are in total (p-1)/2 QRs and (p-1)/2 QNs as stated here :https://brilliant.org/wiki/quadratic-residues/

so it will produce equal no. of 1s and -1s which will cancel out and the remaining (163/163) will yield out '0' as stated by Legendre's Symbol.

M.A.K Ashraf - 3 years ago
Mateen Ulhaq
Aug 10, 2018
  • A computation in SAGE shows:
1
2
>>> sum(kronecker(a, 163) for a in range(1, 163 + 1))
0

  • More generally, a computation in SAGE for primes 2, 3, 5, ..., 163 shows:
1
2
3
>>> f = lambda p: sum(kronecker(a, p) for a in range(1, p + 1))
>>> [f(p) for p in primes(164)]
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

  • That is, for p > 2 p > 2 , a = 1 p ( a p ) = 0 \sum_{a=1}^{p} \left( \dfrac{a}{p} \right) = 0

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...