New Algorithm Involving Quadratic Residues (Part IVb)

Sequences of x from known Quadratic Residues

An integer r is called a quadratic residue modulo p if it is congruent to a perfect square modulo p:

x2r (mod 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.

Algorithm and Tables

This section is a continuation of Part IVa with r = 79 and p = 105 comprised of the three odd primes 3, 5 and 7 and where x2 = 79 + 105(2) = 172. While Part IVa used two tables of ordered pairs one for generating the two x values 33 and −53 and the other for the opposite values of −33 and 53. In this section, however, in order to cut down on duplication, only three sections in one table out of a possible six are all that are required. In addition, one table with only one section was all that was needed to produce all six numbers as positive or negative values.

Thus, setting up Table I according to the instructions layed out in Part IVa with slight differences, the distribution (Dstr) columns have been eliminated with the ordered pair acting as a "distributed" ordered pair. Plus the values to be distributed consist of a composite number (p1p2) multiplied by a prime (p3) as a sum of numbers (see column 1, Table I). Thus, the only table values that are congruent to 79(mod 105) and less than 105 are:

x = ±32, ±38, ±52, ±53, ±67, ±73
along with the initial and final values ±17 and ±88 (from 105 − 17).

Again to obtain the x values we add the initial value 17 to a, b, or c and subtract b, d or f from 62 as shown in the header in Table Ia.

I've chosen to set up four tables to depict the results. For instance in Table I, 15 is multiplied by a sum of numbers totaling to 7, while in the smaller Tables Ib, Ic and Id, the composite numbers 35, 21 and 15 are multiplied by their respective smaller primes 3, 5 and 7. Either way all values for x are depicted in the latter three tables whether they be positive or negative.

Table Ia (p=105, r=79)
15(7)(a,b)17+a17−b21(5)(c,d)17+c17−d 35(3)(e,f)17+e17−f
15(1+6)(15,90)32−73
15(2+5)(30,75)21(1+4)(21,84)38−67
15(3+4)(45,60)21(2+3)(42,63) 35(1+2)(35,70)52−53
15(4+3)(60,34)21(3+2)(63,42) 35(2+1)(70,35)
15(5+2)(75,30)21(4+1)(84,21)
15(6+1)(90,15)
Table Ib (p=105, r=79)
3(35)(a,b)17+a17−b
3(1+34)(3,102)
3(2+33)(6,99)
........
3(5+30)(15,90)32−73
3(6+29)(18,87)
3(7+28)(21,84)38−67
........
3(12+13)(36,69)53−52
........
3(34+1)(102,3)
Table Ic (p=105, r=79)
5(21)(a,b)17+a17−b
5(1+20)(5,100)
5(2+19)(10,95)
5(3+18)(15,90)32−73
........
5(7+14)(35,70)52−53
5(8+13)(40,65)
5(9+12)(45,60)
5(10+11)(50,55)67−38
........
5(20+1)(100,5)
Table Id (p=105, r=79)
7(15)(a,b)17+a17−b
7(1+14)(7,98)
7(2+13)(14,91)
7(3+12)(21,84)38−67
7(4+11)(28,77)
7(5+10)(35,70)52−53
7(6+9)(42,63)
7(7+8)(49,56)
7(8+7)(56,49)73−32
........
7(14+1)(98,7)

It will be shown in Part Ia and Part Ib that the whole tables 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.

Table of Valid Pairs

Table IIe shows a list of all the valid terms for the three smaller tables Ib thru Id, including the initial and final values in the first and last rows. Column one shows the ordered pairs that are required to produce each term in column 2 and 3 when 17 is added to a or 17 subtracts b. If the p1 (= 3, 5 or 7) divides a and b of the ordered pair, only those numbers that are congruent to 0(mod p1) are present in the tables where p1 is the prime and p2p3 the composite. This not apply to the first ordered pair, however, since the first column number of each table start at one. Note o denotes present and × not present in the smaller four column table.

Table Ie (p=105, r=79)
(a,b)17+a17−bp1=3p1=5p1=7
(0,105)17−88ooo
(15,90)32−73oo×
(21,84)38−67o×o
(35,70)52−53×oo
(36,69)53−52o××
(50,55)67−38×o×
(56,49)73−32××o
(71,34)88−17×××

We can take the values obtained from either of the tables and generate a sequence by placing the negative numbers to the left of 17 and the positives to the right in Table II, where the former decreases and the latter increases without bound, respectively. One of the pair of values, 38 and −67, is converted into the pair 67 and −38 for use in Table II (note:x could take on positive or negative values in 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 is generated from 105 − 17. Moreover, the last Δ2 value in row three is obtained by subtracting the sum of 15 + 6 + 14 + 1 + 14 + 6 + 15 from 105 affording the Δ2 = 34, a connecting number that links adjacent groups. In addition, as stated in Part IV, the pattern for the sums of eight terms/group in this sequence is 4p,12p,20p...

Table II (p=105, r=79)
Δ1-20-15-21 1520152134
x-73-53-3817 32526788
Δ215614114 61534
|x|1732385253 677388

A Second Example

The next example uses the equation x2 = r + pq. For r = 99 we find that q = 6 whereby x2 = 99 + 105(6) = 729 = 272. Repeating the algorithm for x = 99 affords x = ±48 and ±57 along with the initial value ±27 and the final value ±78 (from 105 − 27).

Table III (p=105, r=99)
15(7)(a,b)17+a17−b21(5)(c,d)17+c17−d 35(3)(e,f)17+e17−f
15(1+6)(15,90)
15(2+5)(30,75)57−4821(1+4)(21,84)
15(3+4)(45,60)21(2+3)(42,63) 35(1+2)(35,70)
15(4+3)(60,34)21(3+2)(63,42) 35(2+1)(70,35)
15(5+2)(75,30)21(4+1)(84,21)
15(6+1)(90,15)

Note that only one section of the table was utilized giving only the two two values above congruent to 99(mod 105) along with the non table initial and final x values. In total four terms make up each group in the sequence.

Taking the xs from Table III and sequencing as was done above, we generate Table IV with the two sequences on rows two and four and the last Δ2 = 54.

Table IV (Sequence for p=105, r=99)
Δ1-75-30-75 3075307530
x-153-78-4827 57132162237
Δ2219215421 92154
|x|27485778132 153162183

Go to Part IVc Algorithm and Sequences from Quadratic Residues. Go back to Part IVa. Go to homepage.


Copyright © 2023 by Eddie N Gutierrez. E-Mail: enaguti1949@gmail.com