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 page, however, will deal with only composite p.
The x using known quadratic residues in Part IV were generated using the Chinese Remainder Theory on the web page of B. Ikenaga on Quadratic Residues. A newer algorithm has been found which basically does the same using an ordered pair to generate the x values as ± pairs. We start by setting p = 91 into the product of two odd primes (13×7) and generate Table I where:
We can find x either via the Chinese Remainder Theory or using the equation x2 = r + pq. For r = 79 we can try various values of q and if we're lucky q can be low (in this case q = 6) whereby x2 = 79 + 91(6) = 625 = 252. A third option is to generate the number using a simple computer program if q appears to be out of reach.
We set up Table I according to the instructions and find that x = ±38 and ±53 are the only values besides 25 and a fourth number = 66. In addition, we could have employed x = −25 just as well since both are valid values for x. Moreover, when the ordered pairs are reversed the x values obtained (in red) are not congruent to 79(mod 91). The values in red, however, are values having different x values and it will be shown in Part Ia and Part Ib that the whole table can be filled with xs of different r values so that the method can be extended to generate a host of xs without knowing r.
7(13) | Dstr | (a,b) | 25+a | 25−b | 13(7) | Dstr | (c,d) | 25+c | 25−d |
---|---|---|---|---|---|---|---|---|---|
7(1+12) | 7+84 | (7,84) | |||||||
7(2+11) | 14+77 | (14,77) | |||||||
7(3+10) | 21+70 | (21,70) | |||||||
7(4+9) | 28+63 | (28,63) | 53 | -38 | 13(1+6) | 13+78 | (13,78) | 38 | -53 |
7(5+8) | 35+56 | (35,56) | 13(2+5) | 26+65 | (26,65) | ||||
7(6+7) | 42+49 | (42,49) | 13(3+4) | 39+52 | (39,52) | ||||
7(7+6) | 49+42 | (49,42) | 13(4+3) | 52+39 | (52,39) | ||||
7(8+5) | 56+35 | (56,35) | 13(5+2) | 65+26 | (65,26) | ||||
7(9+4) | 63+28 | (63,28) | 88 | −3 | 13(6+1) | 78+13 | (78,13) | 103 | −15 |
7(10+3) | 70+21 | (70,21) | |||||||
7(11+2) | 77+14 | (77,14) | |||||||
7(12+1) | 84+7 | (84,7)) |
We can take the values obtained in Table I and generate a sequence by placing the negative numbers to the left and the positive to the right of x = 25 in Table II, where the negative numbers decrease without bound and the positives increase without bound. The Δ1 values in row one take on the corresponding ordered pair values (either ±) from Table I. If we take the absolute values of the xs in row two of Table II we can produce the sequence in row four starting with the lowest positive x. Since all terms in row four are positive the last term in the group could also have been generated as a positive value from
Δ1 | -63 | -28 | -63 | 28 | 63 | 28 | 63 | 28 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
x | -129 | -66 | -38 | 25 | 53 | 116 | 144 | 207 | ||||||||
Δ2 | 13 | 15 | 13 | 50 | 13 | 15 | 13 | 50 | ||||||||
|x| | 25 | 38 | 53 | 66 | 116 | 129 | 144 | 157 |
We can find x either via the Chinese Remainder Theory or using the equation x2 = r + pq. For r = 88 we find that q = 3 whereby x2 = 88 + 91(3) = 361 = 192. Repeating the algorithm for x = 19 affords x = ±33 and ±58:
7(13) | Dstr | (a,b) | 19+a | 19−b | 13(7) | Dstr | (c,d) | 19+c | 19+−d |
---|---|---|---|---|---|---|---|---|---|
7(1+12) | 7+84 | (7,84) | |||||||
7(2+11) | 14+77 | (14,77) | 33 | −58 | |||||
7(3+10) | 21+70 | (21,70) | |||||||
7(4+9) | 28+63 | (28,63) | 13(1+6) | 13+78 | (13,78) | ||||
7(5+8) | 35+56 | (35,56) | 13(2+5) | 26+65 | (26,65) | ||||
7(6+7) | 42+49 | (42,49) | 13(3+4) | 39+52 | (39,52) | 58 | −33 | ||
7(7+6) | 49+42 | (49,42) | 13(4+3) | 52+39 | (52,39) | 71 | −20 | ||
7(8+5) | 56+35 | (56,35) | 13(5+2) | 65+26 | (65,26) | ||||
7(9+4) | 63+28 | (63,28) | 13(6+1) | 78+13 | (78,13) | ||||
7(10+3) | 70+21 | (70,21) | |||||||
7(11+2) | 77+14 | (77,42) | 96 | −23 | |||||
7(12+1) | 84+7 | (84,7)) |
Repeating the process as above the x values ±33 and ±58 along with 19 and ±72 were inserted into Table IV giving the sequences on row two and four.
Δ1 | -52 | -39 | -52 | 39 | 52 | 39 | 52 | 39 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
x | -124 | -72 | -33 | 19 | 58 | 110 | 149 | 201 | ||||||||
Δ2 | 14 | 25 | 14 | 38 | 14 | 25 | 14 | 38 | ||||||||
|x| | 19 | 33 | 58 | 72 | 110 | 124 | 149 | 163 |
A good thing about this algorithm is that it allows us to use the same tables whenever p is kept constant and the least positive x is varied.
Go to Part IVb Algorithm and Sequences from Quadratic Residues. Go back to Part IV. Go to homepage.
Copyright © 2023 by Eddie N Gutierrez. E-Mail: enaguti1949@gmail.com