Processing math: 100%
Skip to main content

Section 16.7 Our First Full Computation

We will now complete our investigations begun in Subsection 16.3.2 by calculating (2p) using Euler's Criterion. (There are many proofs of the following fact; a nice one using only the existence of a primitive root is [C.7.16].)

We will show this by writing \((p-1)!\) in two different ways below in Proof 16.7.1.

Example 16.7.2.

It is easiest to approach the proof first with an example. We will take p=11.

We can write

(11βˆ’1)!=10!=1(2)(3)(4)(5)(6)(7)(8)(9)(10)
=(2β‹…4β‹…6β‹…8β‹…10)β‹…(1β‹…3β‹…5β‹…7β‹…9)
=25β‹…(1β‹…2β‹…3β‹…4β‹…5)β‹…(1β‹…3β‹…5β‹…7β‹…9).

Notice that 1,3,5 repeat; these are all the odd numbers less than or equal to 11βˆ’12=5.

Now we will try to create 10! again from the numbers on the right after we have factored out 2. In this case, the only ones repeated are 1,3,5, so we are almost there.

But observe that βˆ’1,βˆ’3,βˆ’5≑10,8,6, which are exactly the missing pieces of 10!. So I will factor out βˆ’1 from those three, thus:

10!=25β‹…(1β‹…2β‹…3β‹…4β‹…5)β‹…(1β‹…3β‹…5β‹…7β‹…9)
≑25β‹…(1β‹…2β‹…3β‹…4β‹…5)β‹…(βˆ’1)3β‹…(βˆ’1β‹…βˆ’3β‹…βˆ’5)β‹…(7β‹…9)
≑25β‹…(βˆ’1)3β‹…(1β‹…2β‹…3β‹…4β‹…5)β‹…(10β‹…8β‹…6)(7β‹…9)≑(βˆ’1)3β‹…25β‹…(10!) (mod 11).

Finally, cancel 10! from the first and last element of the preceding chain of congruences, and we get

1≑25(βˆ’1)3⟹2(11βˆ’1)/2≑25≑(βˆ’1)3β‰‘βˆ’1 (mod 11)

and so 2 is not a QR of 11.

Proving the general case basically follows the procedure in the previous example to its natural conclusion; there was nothing special in the above argument about \(p=11\text{.}\)

After writing \((p-1)!\) and factoring out \(2^{(p-1)/2}\text{,}\) the β€œrepeated” numbers will be the odd numbers between 1 and \((p-1)/2\text{.}\) Clearly the only β€œmissing” numbers are even ones between \((p-1)/2\) and \(p\text{,}\) which are just the negatives of the β€œrepeated” odd numbers, so the same argument as above with \((p-1)!\) will work.

It remains to check when we have a QR and when we do not.

  • If \(p\equiv 3\) (mod \(4\)), like \(p=11\text{,}\) then \((p-1)/2\) is odd so there will be

    \begin{equation*} \left(\frac{p-1}{2}-1\right)\frac{1}{2}+1=\frac{p+1}{4} \end{equation*}

    repeated factors, as \(1,3,5\) above.

  • If \(p\equiv 1\) (mod \(4\)) (like \(p=17\)), on the other hand, then \((p-1)/2\) is even and there are exactly

    \begin{equation*} \left(\frac{p-1}{2}\right)\frac{1}{2}=\frac{p-1}{4} \end{equation*}

    repeated factors (in that case, \(1,3,5,7\)).

In either case, whether the number of repeated factors (\((p+1)/4\) or \((p-1)/4\text{,}\) respectively) is even or odd determines whether 2 is a quadratic residue.

Now we simply confirm the formula given in Theorem 16.7.1 in all four possible cases:

  • If \(p\equiv 1\) (mod \(4\)) and \(\frac{p-1}{4}\) is even, \(\left(\frac{2}{p}\right)=1\text{.}\) These conditions imply \(p\equiv 1\) (mod \(8\)), so 2 is a QR when \(p\equiv 1\) (mod \(8\)).

  • If \(p\equiv 1\) (mod \(4\)) and \(\frac{p-1}{4}\) is odd, \(\left(\frac{2}{p}\right)=-1\text{.}\) These conditions imply \(p\equiv 5\) (mod \(8\)), so 2 is not a QR when \(p\equiv 5\) (mod \(8\)).

  • If \(p\equiv 3\) (mod \(4\)) and \(\frac{p+1}{4}\) is even, \(\left(\frac{2}{p}\right)=1\text{.}\) These conditions imply \(p\equiv 7\) (mod \(8\)), so 2 is a QR when \(p\equiv 7\) (mod \(8\)).

  • If \(p\equiv 3\) (mod \(4\)) and \(\frac{p+1}{4}\) is odd, \(\left(\frac{2}{p}\right)=-1\text{.}\) These conditions imply \(p\equiv 3\) (mod \(8\)), so 2 is not a QR when \(p\equiv 3\) (mod \(8\)).

The following Sage cell shows off Theorem 16.7.1.

In the next chapter, we will vastly expand our repertoire of Legendre symbols, and see many applications.