An old number theory problem
related to the Legendre symbol

Wenpeng Zhang1,2
1.  School of Data Science and Engineering
Xi’an Innovation College of Yan’an University, Xi’an, Shaanxi, P. R. China
2. School of Mathematics, Northwest University, Xi’an, Shaanxi, P. R. China
Correspondence: wpzhang@nwu.edu.cn

Abstract: The main purpose of this paper is using a very simple elementary constructive method to study an old number theory problem related to the Legendre symbol modulo p𝑝pitalic_p, and completely solved it.
Keywords:   Prime; Legendre symbol; constructive method; quadratic residue.

2020 Mathematics Subject Classification: 11L40; 11N69.

1. Introduction

Let p𝑝pitalic_p be an odd prime. For any integer aπ‘Žaitalic_a, the famous Legendre symbol modulo p𝑝pitalic_p is define (see [1] and [2]) as

(ap)={1 if a a quadratic residue modulo p;βˆ’1 if a is a quadratic non-residue modulo p;0 if a≑0 modulo p.π‘Žπ‘cases1 if a a quadratic residue modulo p;1 if a is a quadratic non-residue modulo p;0 if a≑0 modulo p.\displaystyle\left(\frac{a}{p}\right)=\left\{\begin{array}[]{ll}1&\textrm{ if % $a$ a quadratic residue modulo $p$;}\\ -1&\textrm{ if $a$ is a quadratic non-residue modulo $p$;}\\ 0&\textrm{ if $a\equiv 0$ modulo $p$.}\end{array}\right.( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) = { start_ARRAY start_ROW start_CELL 1 end_CELL start_CELL if italic_a a quadratic residue modulo italic_p ; end_CELL end_ROW start_ROW start_CELL - 1 end_CELL start_CELL if italic_a is a quadratic non-residue modulo italic_p ; end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL if italic_a ≑ 0 modulo italic_p . end_CELL end_ROW end_ARRAY

This number theory function occupies a very important position in the study of elementary number theory and analytic number theory, so many theorists and scholars have studied its various properties, and a series of important results have been achieved. Perhaps the most significant result is its reciprocity formula. That is, for any two distinct odd primes p𝑝pitalic_p and qπ‘žqitalic_q, one has (see Theorem 9.8 in [1])

(qp)β‹…(pq)=(βˆ’1)(pβˆ’1)⁒(qβˆ’1)4.β‹…π‘žπ‘π‘π‘žsuperscript1𝑝1π‘ž14\displaystyle\left(\frac{q}{p}\right)\cdot\left(\frac{p}{q}\right)=(-1)^{\frac% {(p-1)(q-1)}{4}}.( divide start_ARG italic_q end_ARG start_ARG italic_p end_ARG ) β‹… ( divide start_ARG italic_p end_ARG start_ARG italic_q end_ARG ) = ( - 1 ) start_POSTSUPERSCRIPT divide start_ARG ( italic_p - 1 ) ( italic_q - 1 ) end_ARG start_ARG 4 end_ARG end_POSTSUPERSCRIPT .

Some other properties of Legendre symbol can be found in references [3]–[6], and need not be listed here.

It is clear that

βˆ‘a=1pβˆ’1(ap)=0.superscriptsubscriptπ‘Ž1𝑝1π‘Žπ‘0\sum_{a=1}^{p-1}\left(\frac{a}{p}\right)=0.βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_p - 1 end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) = 0 .

So in the reduced residue system modulo p𝑝pitalic_p, the number of the quadratic residues modulo p𝑝pitalic_p and the number of the quadratic non-residues modulo p𝑝pitalic_p half of each. If p≑1mod4𝑝modulo14p\equiv 1\bmod 4italic_p ≑ 1 roman_mod 4, then note that (βˆ’1p)=11𝑝1\left(\frac{-1}{p}\right)=1( divide start_ARG - 1 end_ARG start_ARG italic_p end_ARG ) = 1, we have

βˆ‘a=1pβˆ’1(ap)=βˆ‘a=1pβˆ’12(ap)+βˆ‘a=1pβˆ’12(pβˆ’ap)=βˆ‘a=1pβˆ’12(ap)+βˆ‘a=1pβˆ’12(βˆ’ap)=2β’βˆ‘a=1pβˆ’12(ap).superscriptsubscriptπ‘Ž1𝑝1π‘Žπ‘superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘superscriptsubscriptπ‘Ž1𝑝12π‘π‘Žπ‘superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘2superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘\sum_{a=1}^{p-1}\left(\frac{a}{p}\right)=\sum_{a=1}^{\frac{p-1}{2}}\left(\frac% {a}{p}\right)+\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{p-a}{p}\right)=\sum_{a=1}^% {\frac{p-1}{2}}\left(\frac{a}{p}\right)+\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{% -a}{p}\right)=2\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right).βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_p - 1 end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) + βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_p - italic_a end_ARG start_ARG italic_p end_ARG ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) + βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG - italic_a end_ARG start_ARG italic_p end_ARG ) = 2 βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) .

So we have the identity

A⁒(p)=βˆ‘a=1pβˆ’12(ap)=0.𝐴𝑝superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘0\displaystyle A(p)=\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)=0.italic_A ( italic_p ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) = 0 .

That is to say, in the set {1, 2,β‹―,pβˆ’12}12⋯𝑝12\{1,\ 2,\ \cdots,\ \frac{p-1}{2}\}{ 1 , 2 , β‹― , divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG }, the number of the quadratic residues modulo p𝑝pitalic_p and the number of the quadratic non-residues modulo p𝑝pitalic_p also half of each. But if p≑3mod4𝑝modulo34p\equiv 3\bmod 4italic_p ≑ 3 roman_mod 4, then pβˆ’12𝑝12\frac{p-1}{2}divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG is an odd number and

A⁒(p)=βˆ‘a=1pβˆ’12(ap)β‰ 0.𝐴𝑝superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘0\displaystyle A(p)=\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)\neq 0.italic_A ( italic_p ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) β‰  0 . (2)

About a century ago, J. Jacobi first conjecture that A⁒(p)>0𝐴𝑝0A(p)>0italic_A ( italic_p ) > 0 and proved by L. Dirichlet [7] and [8] in connection with the theory of binary quadratic forms. The proofs are also given in the books of P. Bachmann [9] and E. Landau [10]. More proofs are due to Kai-Lai Chung [11], A. L. Whiteman [12] and L. Moser [13]. It is a shame that all known proofs are analytic. So, L. Moser in [13] said with emotion, β€œWhile a really elementary proof would be of great interest”.

Through analytic methods, i.e. Dirichlet’s class-number formula h⁒(p)=pΟ€β‹…L⁒(1,Ο‡2)β„Žπ‘β‹…π‘πœ‹πΏ1subscriptπœ’2h(p)=\frac{\sqrt{p}}{\pi}\cdot L(1,\chi_{2})italic_h ( italic_p ) = divide start_ARG square-root start_ARG italic_p end_ARG end_ARG start_ARG italic_Ο€ end_ARG β‹… italic_L ( 1 , italic_Ο‡ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ), where Ο‡2=(βˆ—p)subscriptπœ’2𝑝\chi_{2}=\left(\frac{*}{p}\right)italic_Ο‡ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = ( divide start_ARG βˆ— end_ARG start_ARG italic_p end_ARG ), h⁒(p)β„Žπ‘h(p)italic_h ( italic_p ) denotes the class number of the imaginary quadratic field 𝐐⁒(βˆ’p)𝐐𝑝\mathbf{Q}\left(\sqrt{-p}\right)bold_Q ( square-root start_ARG - italic_p end_ARG ) (see [2], p. 295 or [14], p. 395 or [15], p. 50), one can easy to prove that A⁒(p)>0𝐴𝑝0A(p)>0italic_A ( italic_p ) > 0. In fact, from B. C. Berndt’s work [16] (see Theorem 3.2) we have

βˆ‘a=1pβˆ’12(ap)=i⋅τ⁒(Ο‡2)Ο€β‹…((2p)βˆ’2)β‹…L⁒(1,Ο‡2)=pπ⁒(2βˆ’(2p))β‹…L⁒(1,Ο‡2),superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘β‹…β‹…π‘–πœsubscriptπœ’2πœ‹2𝑝2𝐿1subscriptπœ’2β‹…π‘πœ‹22𝑝𝐿1subscriptπœ’2\displaystyle\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)=\frac{i\cdot% \tau\left(\chi_{2}\right)}{\pi}\cdot\left(\left(\frac{2}{p}\right)-2\right)% \cdot L\left(1,\chi_{2}\right)=\frac{\sqrt{p}}{\pi}\left(2-\left(\frac{2}{p}% \right)\right)\cdot L(1,\chi_{2}),βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) = divide start_ARG italic_i β‹… italic_Ο„ ( italic_Ο‡ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) end_ARG start_ARG italic_Ο€ end_ARG β‹… ( ( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) - 2 ) β‹… italic_L ( 1 , italic_Ο‡ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = divide start_ARG square-root start_ARG italic_p end_ARG end_ARG start_ARG italic_Ο€ end_ARG ( 2 - ( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) ) β‹… italic_L ( 1 , italic_Ο‡ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) , (3)

where τ⁒(Ο‡2)=iβ‹…p𝜏subscriptπœ’2⋅𝑖𝑝\tau(\chi_{2})=i\cdot\sqrt{p}italic_Ο„ ( italic_Ο‡ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = italic_i β‹… square-root start_ARG italic_p end_ARG.

Then combining Dirichlet’s class-number formula and (2) we have

βˆ‘a=1pβˆ’12(ap)=(2βˆ’(2p))β‹…h⁒(p).superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘β‹…22π‘β„Žπ‘\displaystyle\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)=\left(2-\left(% \frac{2}{p}\right)\right)\cdot h(p).βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) = ( 2 - ( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) ) β‹… italic_h ( italic_p ) .

Since 2βˆ’(2p)>022𝑝02-\left(\frac{2}{p}\right)>02 - ( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) > 0 and h⁒(p)>0β„Žπ‘0h(p)>0italic_h ( italic_p ) > 0, so A⁒(p)>0𝐴𝑝0A(p)>0italic_A ( italic_p ) > 0.

That is, if p≑3mod4𝑝modulo34p\equiv 3\bmod 4italic_p ≑ 3 roman_mod 4, then in the set {1, 2,β‹―,pβˆ’12}12⋯𝑝12\{1,\ 2,\ \cdots,\frac{p-1}{2}\}{ 1 , 2 , β‹― , divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG }, the number of the quadratic residues modulo p𝑝pitalic_p is greater than the number of the quadratic non-residues modulo p𝑝pitalic_p. R. K. Guy [17] (see problem F5) asked us:

Is there an elementary proof for A⁒(p)>0𝐴𝑝0A(p)>0italic_A ( italic_p ) > 0?

In fact, the problem has been desired in the literature at least since 1927.

About this problem, it seems to have not solved at present, at least we have not found any elementary proof in the existing literature. In theory, this problem can be proven by using the elementary methods, but no one has been able to find one. Of course, it would be very meaningful to have a simple elementary method to prove this problem, just like the proof of the prime number theorem, the problem was already solved over a century ago by using the non-zero region of the Riemann zeta-function. It is precisely because A. Selberg [18] proved the prime number theorem using elementary methods that he was awarded the Fields Medal. Although A. Wiles [19] proved Fermat’s Last Theorem by using profound modular elliptic curves theory, I think it would be a remarkable achievement if someone could prove Fermat’s Last Theorem by using elementary methods. This is the way to make people feel that the problem and the proof method are aligned.

The main purpose of this paper is using a very simple elementary constructive method and the properties of the Legendre symbol to prove the following:

Theorem. For any odd prime p𝑝pitalic_p with p≑3mod4𝑝modulo34p\equiv 3\bmod 4italic_p ≑ 3 roman_mod 4, we have

A⁒(p)=βˆ‘a=1pβˆ’12(ap)>0.𝐴𝑝superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘0A(p)=\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)>0.italic_A ( italic_p ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) > 0 .

In fact, the proof of our theorem is purely elementary and has been desired in the literature at least since 1927.

3. Proof of the theorem

In this section, we provide a direct proof of the theorem. Of course, in the process of proving the theorem, we need to use some properties of the Legendre symbol, all them can be found in [1] or [2], and will not be repeated here. Now we always assume that p=4⁒m+3𝑝4π‘š3p=4m+3italic_p = 4 italic_m + 3. Let us distinguish between two situations to discuss:

Case 1. (2p)=βˆ’12𝑝1\left(\frac{2}{p}\right)=-1( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) = - 1. In this case, note that (2p)=(βˆ’1)p2βˆ’182𝑝superscript1superscript𝑝218\left(\frac{2}{p}\right)=(-1)^{\frac{p^{2}-1}{8}}( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) = ( - 1 ) start_POSTSUPERSCRIPT divide start_ARG italic_p start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 end_ARG start_ARG 8 end_ARG end_POSTSUPERSCRIPT and (βˆ’1p)=βˆ’11𝑝1\left(\frac{-1}{p}\right)=-1( divide start_ARG - 1 end_ARG start_ARG italic_p end_ARG ) = - 1, we have p=8⁒k+3𝑝8π‘˜3p=8k+3italic_p = 8 italic_k + 3. It is clear that ((pβˆ’1)/2p)=1𝑝12𝑝1\left(\frac{(p-1)/2}{p}\right)=1( divide start_ARG ( italic_p - 1 ) / 2 end_ARG start_ARG italic_p end_ARG ) = 1. Let A={1, 2, 3,β‹―, 2⁒k}𝐴123β‹―2π‘˜A=\{1,\ 2,\ 3,\ \cdots,\ 2k\}italic_A = { 1 , 2 , 3 , β‹― , 2 italic_k } and B={2⁒k+1, 2⁒k+2,2⁒k+3,β‹―, 4⁒k+1}𝐡2π‘˜12π‘˜22π‘˜3β‹―4π‘˜1B=\{2k+1,\ 2k+2,2k+3,\ \cdots,\ 4k+1\}italic_B = { 2 italic_k + 1 , 2 italic_k + 2 , 2 italic_k + 3 , β‹― , 4 italic_k + 1 }. Note that for any odd number r∈Aπ‘Ÿπ΄r\in Aitalic_r ∈ italic_A, (rp)=((pβˆ’r)/2p)π‘Ÿπ‘π‘π‘Ÿ2𝑝\left(\frac{r}{p}\right)=\left(\frac{(p-r)/2}{p}\right)( divide start_ARG italic_r end_ARG start_ARG italic_p end_ARG ) = ( divide start_ARG ( italic_p - italic_r ) / 2 end_ARG start_ARG italic_p end_ARG ). Thus, the quadratic residue modulo p𝑝pitalic_p or quadratic non-residue modulo p𝑝pitalic_p occurs symmetrically in A𝐴Aitalic_A and B𝐡Bitalic_B. Now if 8⁒h+7∈A⁒⋃B8β„Ž7𝐴𝐡8h+7\in A\bigcup B8 italic_h + 7 ∈ italic_A ⋃ italic_B, then 0≀h≀2⁒kβˆ’340β„Ž2π‘˜340\leq h\leq\frac{2k-3}{4}0 ≀ italic_h ≀ divide start_ARG 2 italic_k - 3 end_ARG start_ARG 4 end_ARG. Note that (2p)=βˆ’12𝑝1\left(\frac{2}{p}\right)=-1( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) = - 1, there must exist a pair quadratic residues modulo p𝑝pitalic_p: 8⁒h+78β„Ž78h+78 italic_h + 7 and pβˆ’8⁒hβˆ’72=4⁒(kβˆ’h)βˆ’2𝑝8β„Ž724π‘˜β„Ž2\frac{p-8h-7}{2}=4(k-h)-2divide start_ARG italic_p - 8 italic_h - 7 end_ARG start_ARG 2 end_ARG = 4 ( italic_k - italic_h ) - 2 or 2⁒(kβˆ’h)βˆ’12π‘˜β„Ž12(k-h)-12 ( italic_k - italic_h ) - 1 and pβˆ’2⁒(kβˆ’h)+12=3⁒k+h+2𝑝2π‘˜β„Ž123π‘˜β„Ž2\frac{p-2(k-h)+1}{2}=3k+h+2divide start_ARG italic_p - 2 ( italic_k - italic_h ) + 1 end_ARG start_ARG 2 end_ARG = 3 italic_k + italic_h + 2. So there are at least 2⁒([2⁒kβˆ’34]+1)=2⁒[2⁒k+14]2delimited-[]2π‘˜3412delimited-[]2π‘˜142\left(\left[\frac{2k-3}{4}\right]+1\right)=2\left[\frac{2k+1}{4}\right]2 ( [ divide start_ARG 2 italic_k - 3 end_ARG start_ARG 4 end_ARG ] + 1 ) = 2 [ divide start_ARG 2 italic_k + 1 end_ARG start_ARG 4 end_ARG ] such quadratic residue modulo p𝑝pitalic_p.

If 8⁒h+3∈A⁒⋃B8β„Ž3𝐴𝐡8h+3\in A\bigcup B8 italic_h + 3 ∈ italic_A ⋃ italic_B, then 0≀h≀2⁒kβˆ’140β„Ž2π‘˜140\leq h\leq\frac{2k-1}{4}0 ≀ italic_h ≀ divide start_ARG 2 italic_k - 1 end_ARG start_ARG 4 end_ARG. So one of 8⁒h+38β„Ž38h+38 italic_h + 3 ( pβˆ’8⁒hβˆ’32=4⁒(kβˆ’h)𝑝8β„Ž324π‘˜β„Ž\frac{p-8h-3}{2}=4(k-h)divide start_ARG italic_p - 8 italic_h - 3 end_ARG start_ARG 2 end_ARG = 4 ( italic_k - italic_h )) and 2⁒(kβˆ’h)2π‘˜β„Ž2(k-h)2 ( italic_k - italic_h ) is a quadratic residue modulo p𝑝pitalic_p. So there are at least [2⁒kβˆ’14]+1=[2⁒k+34]delimited-[]2π‘˜141delimited-[]2π‘˜34\left[\frac{2k-1}{4}\right]+1=\left[\frac{2k+3}{4}\right][ divide start_ARG 2 italic_k - 1 end_ARG start_ARG 4 end_ARG ] + 1 = [ divide start_ARG 2 italic_k + 3 end_ARG start_ARG 4 end_ARG ] such quadratic residue modulo p𝑝pitalic_p.

If 8⁒h+1∈A8β„Ž1𝐴8h+1\in A8 italic_h + 1 ∈ italic_A, then 0≀h≀kβˆ’140β„Žπ‘˜140\leq h\leq\frac{k-1}{4}0 ≀ italic_h ≀ divide start_ARG italic_k - 1 end_ARG start_ARG 4 end_ARG. In this case, one of 8⁒h+18β„Ž18h+18 italic_h + 1 ( pβˆ’8⁒hβˆ’12=4⁒(kβˆ’h)+1𝑝8β„Ž124π‘˜β„Ž1\frac{p-8h-1}{2}=4(k-h)+1divide start_ARG italic_p - 8 italic_h - 1 end_ARG start_ARG 2 end_ARG = 4 ( italic_k - italic_h ) + 1) and 2⁒(8⁒h+1)28β„Ž12(8h+1)2 ( 8 italic_h + 1 ) is a quadratic residue modulo p𝑝pitalic_p. Note that 1111 and pβˆ’12𝑝12\frac{p-1}{2}divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG both are quadratic residues modulo p𝑝pitalic_p. So there are at least [kβˆ’14]+2=[k+34]+1delimited-[]π‘˜142delimited-[]π‘˜341\left[\frac{k-1}{4}\right]+2=\left[\frac{k+3}{4}\right]+1[ divide start_ARG italic_k - 1 end_ARG start_ARG 4 end_ARG ] + 2 = [ divide start_ARG italic_k + 3 end_ARG start_ARG 4 end_ARG ] + 1 such quadratic residue modulo p𝑝pitalic_p.

If 8⁒h+5∈A8β„Ž5𝐴8h+5\in A8 italic_h + 5 ∈ italic_A, then 0≀h≀kβˆ’340β„Žπ‘˜340\leq h\leq\frac{k-3}{4}0 ≀ italic_h ≀ divide start_ARG italic_k - 3 end_ARG start_ARG 4 end_ARG. In this case, one of 8⁒h+58β„Ž58h+58 italic_h + 5 ( pβˆ’8⁒hβˆ’52=4⁒(kβˆ’h)βˆ’1𝑝8β„Ž524π‘˜β„Ž1\frac{p-8h-5}{2}=4(k-h)-1divide start_ARG italic_p - 8 italic_h - 5 end_ARG start_ARG 2 end_ARG = 4 ( italic_k - italic_h ) - 1) and 2⁒(8⁒h+5)28β„Ž52(8h+5)2 ( 8 italic_h + 5 ) is a quadratic residue modulo p𝑝pitalic_p. So there are at least [kβˆ’34]+1=[k+14]delimited-[]π‘˜341delimited-[]π‘˜14\left[\frac{k-3}{4}\right]+1=\left[\frac{k+1}{4}\right][ divide start_ARG italic_k - 3 end_ARG start_ARG 4 end_ARG ] + 1 = [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] such quadratic residue modulo p𝑝pitalic_p. Note that the quadratic residues constructed above are not repeated. So if p=8⁒k+3𝑝8π‘˜3p=8k+3italic_p = 8 italic_k + 3, then in the set {1, 2, 3,β‹―,4⁒k+1}123β‹―4π‘˜1\{1,\ 2,\ 3,\ \cdots,4k+1\}{ 1 , 2 , 3 , β‹― , 4 italic_k + 1 }, the number of the quadratic residues modulo p𝑝pitalic_p is at least

2⁒[2⁒k+14]+[2⁒k+34]+[k+34]+1+[k+14]=2⁒k+1.2delimited-[]2π‘˜14delimited-[]2π‘˜34delimited-[]π‘˜341delimited-[]π‘˜142π‘˜12\left[\frac{2k+1}{4}\right]+\left[\frac{2k+3}{4}\right]+\left[\frac{k+3}{4}% \right]+1+\left[\frac{k+1}{4}\right]=2k+1.2 [ divide start_ARG 2 italic_k + 1 end_ARG start_ARG 4 end_ARG ] + [ divide start_ARG 2 italic_k + 3 end_ARG start_ARG 4 end_ARG ] + [ divide start_ARG italic_k + 3 end_ARG start_ARG 4 end_ARG ] + 1 + [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] = 2 italic_k + 1 .

So in the case p=8⁒k+3𝑝8π‘˜3p=8k+3italic_p = 8 italic_k + 3, we have

A⁒(p)=βˆ‘a=1pβˆ’12(ap)>0.𝐴𝑝superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘0\displaystyle A(p)=\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)>0.italic_A ( italic_p ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) > 0 . (4)

Case 2. (2p)=12𝑝1\left(\frac{2}{p}\right)=1( divide start_ARG 2 end_ARG start_ARG italic_p end_ARG ) = 1. In this case, we have p=8⁒k+7𝑝8π‘˜7p=8k+7italic_p = 8 italic_k + 7. For any 8⁒h+3∈{1, 2, 3,β‹―, 4⁒k+3}8β„Ž3123β‹―4π‘˜38h+3\in\{1,\ 2,\ 3,\ \cdots,\ 4k+3\}8 italic_h + 3 ∈ { 1 , 2 , 3 , β‹― , 4 italic_k + 3 }, it is clear that one of 8⁒h+38β„Ž38h+38 italic_h + 3 and 4⁒(kβˆ’h)+24π‘˜β„Ž24(k-h)+24 ( italic_k - italic_h ) + 2 is a quadratic residue modulo p𝑝pitalic_p. If 8⁒h+3≀2⁒k+18β„Ž32π‘˜18h+3\leq 2k+18 italic_h + 3 ≀ 2 italic_k + 1 is a quadratic residue modulo p𝑝pitalic_p, then 2⁒(8⁒h+3)28β„Ž32(8h+3)2 ( 8 italic_h + 3 ) is also a quadratic residue modulo p𝑝pitalic_p. If 4⁒(kβˆ’h)+24π‘˜β„Ž24(k-h)+24 ( italic_k - italic_h ) + 2 is a quadratic residue modulo p𝑝pitalic_p, then 2⁒(kβˆ’h)+12π‘˜β„Ž12(k-h)+12 ( italic_k - italic_h ) + 1 is also a quadratic residue modulo p𝑝pitalic_p. So in this case, there are at least

[k2]+1+[kβˆ’14]+1=[k2]+[k+34]+1delimited-[]π‘˜21delimited-[]π‘˜141delimited-[]π‘˜2delimited-[]π‘˜341\left[\frac{k}{2}\right]+1+\left[\frac{k-1}{4}\right]+1=\left[\frac{k}{2}% \right]+\left[\frac{k+3}{4}\right]+1[ divide start_ARG italic_k end_ARG start_ARG 2 end_ARG ] + 1 + [ divide start_ARG italic_k - 1 end_ARG start_ARG 4 end_ARG ] + 1 = [ divide start_ARG italic_k end_ARG start_ARG 2 end_ARG ] + [ divide start_ARG italic_k + 3 end_ARG start_ARG 4 end_ARG ] + 1

such quadratic residues in set {1, 2, 3,β‹―, 4⁒k+3}123β‹―4π‘˜3\{1,\ 2,\ 3,\ \cdots,\ 4k+3\}{ 1 , 2 , 3 , β‹― , 4 italic_k + 3 }.

For any 8⁒h+7∈{1, 2, 3,β‹―, 2⁒k+1}8β„Ž7123β‹―2π‘˜18h+7\in\{1,\ 2,\ 3,\cdots,\ 2k+1\}8 italic_h + 7 ∈ { 1 , 2 , 3 , β‹― , 2 italic_k + 1 } and pβˆ’8⁒hβˆ’72=4⁒(kβˆ’h)𝑝8β„Ž724π‘˜β„Ž\frac{p-8h-7}{2}=4(k-h)divide start_ARG italic_p - 8 italic_h - 7 end_ARG start_ARG 2 end_ARG = 4 ( italic_k - italic_h ), it is clear that one of them is a quadratic residue modulo p𝑝pitalic_p. If 8⁒h+7≀2⁒k+18β„Ž72π‘˜18h+7\leq 2k+18 italic_h + 7 ≀ 2 italic_k + 1 is a quadratic residue modulo p𝑝pitalic_p, then 2⁒(8⁒h+7)28β„Ž72(8h+7)2 ( 8 italic_h + 7 ) is also a quadratic residue modulo p𝑝pitalic_p. If 4⁒(kβˆ’h)4π‘˜β„Ž4(k-h)4 ( italic_k - italic_h ) a quadratic residue modulo p𝑝pitalic_p, then 2⁒(kβˆ’h)2π‘˜β„Ž2(k-h)2 ( italic_k - italic_h ) is also a a quadratic residue modulo p𝑝pitalic_p. Note that 8⁒h+7≀2⁒k+18β„Ž72π‘˜18h+7\leq 2k+18 italic_h + 7 ≀ 2 italic_k + 1 implies 0≀h≀[kβˆ’34]0β„Ždelimited-[]π‘˜340\leq h\leq\left[\frac{k-3}{4}\right]0 ≀ italic_h ≀ [ divide start_ARG italic_k - 3 end_ARG start_ARG 4 end_ARG ], there are a total of [kβˆ’34]+1=[k+14]delimited-[]π‘˜341delimited-[]π‘˜14\left[\frac{k-3}{4}\right]+1=\left[\frac{k+1}{4}\right][ divide start_ARG italic_k - 3 end_ARG start_ARG 4 end_ARG ] + 1 = [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] such integers. If [kβˆ’24]≀h≀[kβˆ’12]delimited-[]π‘˜24β„Ždelimited-[]π‘˜12\left[\frac{k-2}{4}\right]\leq h\leq\left[\frac{k-1}{2}\right][ divide start_ARG italic_k - 2 end_ARG start_ARG 4 end_ARG ] ≀ italic_h ≀ [ divide start_ARG italic_k - 1 end_ARG start_ARG 2 end_ARG ], then 2⁒k+3≀8⁒h+7≀4⁒k+32π‘˜38β„Ž74π‘˜32k+3\leq 8h+7\leq 4k+32 italic_k + 3 ≀ 8 italic_h + 7 ≀ 4 italic_k + 3. In this way, there are at least 2⁒[k+14]+[kβˆ’12]βˆ’[kβˆ’24]+1=[k+12]+[k+14]+12delimited-[]π‘˜14delimited-[]π‘˜12delimited-[]π‘˜241delimited-[]π‘˜12delimited-[]π‘˜1412\left[\frac{k+1}{4}\right]+\left[\frac{k-1}{2}\right]-\left[\frac{k-2}{4}% \right]+1=\left[\frac{k+1}{2}\right]+\left[\frac{k+1}{4}\right]+12 [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] + [ divide start_ARG italic_k - 1 end_ARG start_ARG 2 end_ARG ] - [ divide start_ARG italic_k - 2 end_ARG start_ARG 4 end_ARG ] + 1 = [ divide start_ARG italic_k + 1 end_ARG start_ARG 2 end_ARG ] + [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] + 1 quadratic residue modulo p𝑝pitalic_p in the set {1, 2, 3,β‹―, 4⁒k+3}123β‹―4π‘˜3\{1,\ 2,\ 3,\ \cdots,\ 4k+3\}{ 1 , 2 , 3 , β‹― , 4 italic_k + 3 }.

Similarly, if 8⁒h+1≀2⁒k+18β„Ž12π‘˜18h+1\leq 2k+18 italic_h + 1 ≀ 2 italic_k + 1, then 0≀h≀[k4]0β„Ždelimited-[]π‘˜40\leq h\leq\left[\frac{k}{4}\right]0 ≀ italic_h ≀ [ divide start_ARG italic_k end_ARG start_ARG 4 end_ARG ]; If 8⁒h+5≀2⁒k+18β„Ž52π‘˜18h+5\leq 2k+18 italic_h + 5 ≀ 2 italic_k + 1, then 0≀h≀[kβˆ’24]0β„Ždelimited-[]π‘˜240\leq h\leq\left[\frac{k-2}{4}\right]0 ≀ italic_h ≀ [ divide start_ARG italic_k - 2 end_ARG start_ARG 4 end_ARG ]. Note that the quadratic residues constructed above are not repeated. So in the set {1,2,3,β‹―,4⁒k+2,4⁒k+3}123β‹―4π‘˜24π‘˜3\{1,2,3,\cdots,4k+2,4k+3\}{ 1 , 2 , 3 , β‹― , 4 italic_k + 2 , 4 italic_k + 3 }, there are at least

[k2]+[k+34]+1+[k+12]+[k+14]+1+[k4]+1+[k+24]delimited-[]π‘˜2delimited-[]π‘˜341delimited-[]π‘˜12delimited-[]π‘˜141delimited-[]π‘˜41delimited-[]π‘˜24\displaystyle\left[\frac{k}{2}\right]+\left[\frac{k+3}{4}\right]+1+\left[\frac% {k+1}{2}\right]+\left[\frac{k+1}{4}\right]+1+\left[\frac{k}{4}\right]+1+\left[% \frac{k+2}{4}\right][ divide start_ARG italic_k end_ARG start_ARG 2 end_ARG ] + [ divide start_ARG italic_k + 3 end_ARG start_ARG 4 end_ARG ] + 1 + [ divide start_ARG italic_k + 1 end_ARG start_ARG 2 end_ARG ] + [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] + 1 + [ divide start_ARG italic_k end_ARG start_ARG 4 end_ARG ] + 1 + [ divide start_ARG italic_k + 2 end_ARG start_ARG 4 end_ARG ] (5)
=\displaystyle== [k2]+[k+12]+[k4]+[k+14]+[k+24]+[k+34]+3delimited-[]π‘˜2delimited-[]π‘˜12delimited-[]π‘˜4delimited-[]π‘˜14delimited-[]π‘˜24delimited-[]π‘˜343\displaystyle\left[\frac{k}{2}\right]+\left[\frac{k+1}{2}\right]+\left[\frac{k% }{4}\right]+\left[\frac{k+1}{4}\right]+\left[\frac{k+2}{4}\right]+\left[\frac{% k+3}{4}\right]+3[ divide start_ARG italic_k end_ARG start_ARG 2 end_ARG ] + [ divide start_ARG italic_k + 1 end_ARG start_ARG 2 end_ARG ] + [ divide start_ARG italic_k end_ARG start_ARG 4 end_ARG ] + [ divide start_ARG italic_k + 1 end_ARG start_ARG 4 end_ARG ] + [ divide start_ARG italic_k + 2 end_ARG start_ARG 4 end_ARG ] + [ divide start_ARG italic_k + 3 end_ARG start_ARG 4 end_ARG ] + 3
=\displaystyle== k+k+3=2⁒k+3π‘˜π‘˜32π‘˜3\displaystyle k+k+3=2k+3italic_k + italic_k + 3 = 2 italic_k + 3

quadratic residue modulo p𝑝pitalic_p.

So if p=8⁒k+7𝑝8π‘˜7p=8k+7italic_p = 8 italic_k + 7, then from (4) we also have

A⁒(p)=βˆ‘a=1pβˆ’12(ap)>0.𝐴𝑝superscriptsubscriptπ‘Ž1𝑝12π‘Žπ‘0\displaystyle A(p)=\sum_{a=1}^{\frac{p-1}{2}}\left(\frac{a}{p}\right)>0.italic_A ( italic_p ) = βˆ‘ start_POSTSUBSCRIPT italic_a = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT divide start_ARG italic_p - 1 end_ARG start_ARG 2 end_ARG end_POSTSUPERSCRIPT ( divide start_ARG italic_a end_ARG start_ARG italic_p end_ARG ) > 0 . (6)

It is clear that p≑3mod4𝑝modulo34p\equiv 3\bmod 4italic_p ≑ 3 roman_mod 4 if and only if p=8⁒k+3𝑝8π‘˜3p=8k+3italic_p = 8 italic_k + 3 or p=8⁒k+7𝑝8π‘˜7p=8k+7italic_p = 8 italic_k + 7.

Combining (3) and (5) we complete the proof of our theorem.


Acknowledgements: The author would like to express his sincere gratitude to Professor Gong Ke for his comments and suggestions.

References

  • [1] T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, New York, 1976.
  • [2] R. Ayoub, An introduction to the analytic theory of numbers, American Mathematical Society, Providence, 1963, pp. 295.
  • [3] A. Raymond, S. Chowla and H. Walum, On sums involving quadratic characters, Journal of London Mathematical Society, 42 (1967), 152–154.
  • [4] L. Carlitz, Some sums connected with quadratic residues, Proc. Amer. Math. Soc., 4 (1953), 12–15.
  • [5] R. H. Hudson, On sequences of quadratic non-residues, Journal of Number Theory, 3 (1971), 178–181.
  • [6] B. C. Berndt and S. Chowla, Zero sums of the Legendre symbol, Nordisk Mat. Tidskr. 22 (1974), 5–8.
  • [7] L. Dirichlet, Recherches sur diverses applications de l’analyse infinitΓ©simale Γ  la thΓ©orie des nombres, J. Reine Angew. Math., 19 (1839), 324–369.
  • [8] L. Dirichlet, Vorlesungen ΓΌber Zahlentheorie, 4th ed., 1894, Β§5.
  • [9] P. Bachmann, Analytische Zahlentheorie II, 1894, Β§8.
  • [10] E. Landau, Vorlesungen ΓΌber Zahlentheorie, Band 1, Leipzig: S. Hirzel, 1927.
  • [11] Kai-Lai Chung, Note on a theorem on quadratic residues, Bull. Amer. Math. Soc., 47 (1941), 514–516.
  • [12] A. L. Whiteman, Theorems on quadratic residues, Mathematics Magazine, 23 (1949), 71–74.
  • [13] L. Moser, A theorem on quadratic residues, Proc. Amer. Math. Soc., 2 (1951), 503–504.
  • [14] H. Hasse, Lectures on Number Theory, Springer -Verlag, Berlin, 1964, pp. 395.
  • [15] H. Davenport, Multiplicative Number Theory, Markham, Chicago, 1967.
  • [16] B. C. Berndt, Classical theorems on quadratic residues, L’Enseignement Mathe´´𝑒\acute{e}overΒ΄ start_ARG italic_e end_ARGmatique, T. XXII (1976), 261–304.
  • [17] R. K. Guy, Unsolved Problems in Number Theory, Springer-Vlerlag, Berlin, 1994, pp. 244.
  • [18] A. Selberg, An elementary proof of the prime number theorem, Annals of Mathematics, 50 (1949), 305–313.
  • [19] A. Wiles, Modular elliptic curves and Fermat’s last theorem, Annals of Mathematics, 141 (1995), 443-551.