An integer r is called a quadratic residue modulo p if it is congruent to a perfect square modulo p:
with the number of residues for a given prime given by the equation (p − 1)/2 where the one value x2 = 0 is removed before division by 2.
This section is a continuation of Part IVc with r = 393 and using an even number p = 1564 where p may be factored as either 2(782) or 4(391). If
Thus the values to be distributed directly into an ordered pair (Table IIa, column 2) consists of 2 multiplied by a composite number p1 (as a sum of numbers) or 4 multiplied by a prime p2 (as a sum of numbers) (see column 1, Table IIa). The only table values that are congruent to 393(mod 1564) and less than 1564 are:
These values are obtained by applying the algorithm to 4(391) and 391(4), where the second number is composed of a sum totaling that number and using the initial value of x = 317 (see Table I):
4(391) | (a,b) | 317+a | 317−b | 391(4) | (c,d) | 317+c | 317−d |
---|---|---|---|---|---|---|---|
4(0+391) | (0,1564) | 317 | −1247 | ||||
.. | .. | .. | .. | ||||
4(37+354) | (148,1416) | 465 | −1099 | 391(1+3) | (391,1173) | ||
.. | .. | 391(2+2) | (782,782) | 1099 | −465 | ||
4(207+184) | (828,736) | 1145 | −419 | 391(3+1) | (1173,391) | ||
.. | .. | .. | .. | ||||
4(221+170) | (884,680) | 1201 | −363 |
As one can see all the x terms in one form or the other (positive/negative) are produced.
Table IIa shows a list of all the valid terms of p = 1564, r = 393. Column two shows the ordered pairs that are required to produce each term in column 2 and 3 when 317 is added to a or 317 subtracts b. If the
2n(1564/2n) | (a,b) | 317+a | 317−b | pn=2 | pn=4 |
---|---|---|---|---|---|
4(0+391) | (0,1564) | 317 | −1247 | × | o |
2(23+759) | (46,1518) | 363 | −1201 | o | × |
2(51+731) | (102,1462) | 419 | −1145 | o | × |
4(37+354) | (148,1416) | 465 | −1099 | × | o |
2(391+391) | (782,782) | 1099 | −465 | o | × |
4(207+184) | (828,736) | 1145 | −419 | × | o |
4(221+170) | (884,680) | 1201 | −363 | × | o |
2(465+317) | (930,634) | 1247 | −317 | o | × |
|
|
Note that Table IIc corresponds to the left half of Table I.
Thus, while all the x values are present in Table Ia they are split up so that half go into Table IIa and the opposite x values go into Table IIb. Each table can, therefore, reproduce all the x values in either of their ± forms. So when a search is done using pn using either 1 or 2 for the value of n one is assured that half of all the x terms will be captured. To get the other half just flip the polarities of each x term obtained.
Since 391 = 17×23 Table III will consist 23(17) on the left and 17(23) on the right. Using 2(mod 391) as mentioned earlier and an initial x of 28 obtained by inspection from
where the only values in common with 393(mod 1564) are ±317, ±363, ±419 and ±465.
These values are obtained by applying the algorithm to 4(391) and 391(4), where the second number is composed of a sum totaling that number and using the initial value of x = 28 (see Table III):
23(17) | (a,b) | 28+a | 28−b | 17(23) | (c,d) | 28+c | 28−d |
---|---|---|---|---|---|---|---|
23(0+17) | (0,391) | 28 | −363 | 17(0+23) | (0,391) | 28 | −363 |
.. | .. | .. | .. | ||||
23(2+15) | (46,345) | 74 | −317 | 17(17+6) | (289,102) | 317 | −74 |
.. | .. | .. | .. | ||||
23(17+0) | (391,0) | 419 | −28 | 17(23+0) | (391,0) | 419 | −28 |
The result besides giving all the x values as positive or negative, also produces the next higher value of 419 in the sequence of numbers.
Go back to Part IVc Algorithm and Sequences from Quadratic Residues. Go to homepage.
Copyright © 2023 by Eddie N Gutierrez. E-Mail: enaguti1949@gmail.com