Let S be the sum of all integers 1 ≤ n ≤ 2 0 1 6 that are quadratic residues modulo 2017. What are the last three digits of S ?
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.
What about the sum of quadratic residues of p = 4 k + 3 , k ≥ 2 ? I believe that the answer is p k .
What about the sum of quadratic residues of p = 4 k + 3 , k ≥ 2 ? I believe that the answer is p k .
Log in to reply
Hmm.. a simple solution to this does not seem to exist. The sum of quadratic residues of p = 4 k + 3 is p k only for these primes: 3, 7, 11, 19, 43, 67 and 163. For all other primes, the sum is less than p k .
I have written a python code that outputs various properties of primes that are 3 m o d 4 . I have analyzed it for some time, but I haven't been able to find any discernible pattern yet.
quadres.py (Right Click -> Save as...)
The same question is posted on this Math Forum page. I am not able to understand the Doctor's answer but what I do get is that the answer to this problem is probably not a simple one.
Log in to reply
Oh haha, fooled by trying small cases. Note that it doesn't work for 3 (which is why I put k ≥ 2 ).
Ah yes, the class number of the quadratic field Q [ − p ] . That will involve quite a bit of machinery in Algebraic Number Theory for you to understand why that's the case.
What do you mean by quadratic residue? There is really no clue for this in the question.
Log in to reply
You can see the wiki page which I've just linked to.
Problem Loading...
Note Loading...
Set Loading...
This solution is adapted from two MathSE answers - Answer 1 and Answer 2
Observe that 2017 is a prime and is 1 mod 4. We will make use of properties of primes that are 1 mod 4.
Lemma: For any prime p ≡ 1 ( m o d 4 ) , we see that − 1 is a quadratic residue mod p .
Proof: We can make use of Wilson's theorem to prove this. We can write − 1 ≡ ( p − 1 ) ! ≡ ( 1 × 2 × 3 × ⋯ × 2 p − 1 ) × ( 2 p + 1 × ⋯ × ( p − 1 ) ) ≡ ( ( 2 p − 1 ) ! ) 2 × ( − 1 ) 2 p − 1 ≡ ( ( 2 p − 1 ) ! ) 2 × 1 (Since 2 p − 1 is even.) ≡ ( ( 2 p − 1 ) ! ) 2 ( m o d p )
We see that there exists an integer ( ( 2 p − 1 ) ! ) whose square is -1 mod p. Hence − 1 is a quadratic residue mod p. ■
Since product of two residues is also a residue, for every residue a , we see that a × ( − 1 ) = − a ≡ p − a is also a quadratic residue mod p. We can divide all residues of p into pairs a and p − a . The sum of each pair is a + p − a = p .
We know that any odd prime number has exactly 2 p − 1 quadratic residues mod p, which means there are 4 p − 1 pairs of residues. Each pair has sum of p , therefore the total sum is p × 4 p − 1 .
In this problem, p = 2 0 1 7 . There the sum is 2 0 1 7 × 4 2 0 1 7 − 1 = 4 2 0 1 7 × 2 0 1 6 = 2 0 1 7 × 5 0 4 . We need to find its last three digits.
2 0 1 7 × 5 0 4 ≡ 1 7 × 5 0 4 ( m o d 1 0 0 0 ) ≡ 8 5 6 8 ( m o d 1 0 0 0 ) ≡ 5 6 8 ( m o d 1 0 0 0 )
The last three digits of the sum of residues is 5 6 8 □