Tuesday, 7 July 2026

Exercise (7.1).1

Find $x^2 \pmod p$ for all the least positive residues of the following. 

In each case plot the graph of $x$ against $x^2 \pmod p$ for:

(a) $p= 5$

(b) $p= 17$

(c) $p= 19$

For each of these primes $p$ solve $x^2 \equiv 2 \pmod p$ and the equivalent quadratic Diophantine equation 

$$x^2 = 2 + py$$


(a) The following table shows the values of $x^2 \pmod 5$.

xx^2 mod 5
11
24
34
41

The following is a plot of $x^2 \pmod 5$ against $x$.

The table and graph show the congruence $x^2 \equiv 2 \pmod 5$ has no solutions, and so the quadratic Diophantine equation $x^2 = 2 + 5y$ has no solutions.


(b) The following table shows the values of $x^2 \pmod {17}$.

xx^2 mod 17
11
24
39
416
58
62
715
813
913
1015
112
128
1316
149
154
161

The following is a plot of $x^2 \pmod {17}$ against $x$.

The table and graph shows the congruence $x^2 \equiv 2 \pmod 5$ has solutions $x \equiv 6 \pmod {17}$ and $x \equiv 11 \pmod {17}$.

Using $y=\frac{x^2-2}{17}$, the solutions to the Diophantine equation $x^2 = 2 + 17y$ are $(x,y) = (6,2)$ and $(x,y) = (11,7)$.


(c) The following table shows the values of $x^2 \pmod {19}$.

xx^2 mod 19
11
24
39
416
56
617
711
87
95
105
117
1211
1317
146
1516
169
174
181

The following is a plot of $x^2 \pmod {19}$ against $x$.

The table and graph show the congruence $x^2 \equiv 2 \pmod {19}$ has no solutions, and so the quadratic Diophantine equation $x^2 = 2 + 19y$ has no solutions.