New Algorithm Involving Quadratic Residues (Part IVc)

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 IVb with r = 379 and p = 1155 comprised of the four odd primes 3, 5, 7 and 11 and where x2 = 379 + 1155(3) = 622. While Part IVb used one table for the six ordered x pairs this section, however, will use five tables of two sections each, to generate the fourteen x values besides the initial and final values, for a total of 16 terms.

The first two tables consists of a composite number p1p2p3 multiplied by a prime p4 as a sum of numbers, while the latter three tables consists of composite numbers p1p2 multiplied by a prime p3 as a sum of numbers. These are set up according to the instructions layed out in Part IVa, with the ordered pair acting as a "distributed" ordered pair, i.e., the composite numbers are distributed and the sum of terms are converted directly into an ordered pair. The initial positive value x is added to the first term of the ordered pair and subtracted from the second term of the ordered pair to obtain an x value. Both xs obtained in this manner must be congruent to 379 (mod 1155). Thus the only table values that are congruent to 379(mod 1155) and less than 1155 are:

x = ±92, ±202, ±293, ±323, ±337, ±433, ±568, ±587, ±722, ±818, ±832, ±862, ±953, ±1063,
along with the initial and final values ±62 and ±1093 (from 1155 − 62).

Again to recapitulate to obtain the terms we add the initial value of 62 to a, b, or c and subtract b, d or f from 62 as shown in the headers.

The first two tables for p = 1155 consists of a p1p2p3 multiplied by a p4 with p1p2p3 equal to 105 and 165 in Table Ia, and 231 and 385 in Table Ib.

Table Ia (p=1155, r=379)
105(11)(a,b)62+a62−b165(7)(c,d)62+c62−d
105(1+10)(105,1050)
105(2+9)(210,945)
105(3+8)(315,840)165(1+6)(165,990)
105(4+7)(420,735)165(2+5)(330,825)
105(5+6)(525,630)587−568165(3+4)(495,660)
105(6+5)(630,525)165(4+3)(660,495)722−433
105(7+4)(735,420)165(5+2)(825,330)
105(8+3)(840,315)165(6+1)(990,165)
105(9+4)(945,210)
105(10+1)(1050,105)
Table Ib (p=1155, r=379)
231(5)(e,f)62+e62−f385(3)(g,h)62+g62−h
231(1+4)(231,924)293−862
231(2+3)(462,693)385(1+2)(385,770)832−323
231(3+2)(693,462)385(2+1)(770,385)
231(4+1))(924,231)

The number of x terms obtained in Parts IVa and Part IVb were four and eight, respectively. If the number is based on 2n then the number of x terms could be as high as sixteen. Since only a total of ten values were obtained, eight (from the tables) and two non table terms. A further search using three sub tables consisting of a p1p2 multiplied by a p3p4 where p1p2 is equal to 55 and 35 in Table IIa, 15 and 21 in Table IIb and 33 and 77 in Table IIc provided six more x terms plus additional duplicate terms in red.

Table IIa (p=1155, r=379)
55(21)(a,b)62+a62−b35(33)(c,d)62+c62−d
55(1+20)(55,1100)
55(2+19)(110,1045)35(1+32)(35,1120)
55(3+18)(165,990)35(2+31)(70,1085)
55(4+17)(220,935)35(3+30)(105,1050)
55(5+16)(275,880)337−81835(4+29)(140,1015)202−953
55(6+15)(330,825)35(5+28)(175,980)
........
55(12+9)(660,495)722−433
55(13+8)(715,440)
55(14+7)(770,385)832−323
........
55(20+1)(1100,55)35(32+1)(1120,35)
Table IIb (p=1155, r=379)
15(77)(a,b)62+a62−b21(55)(c,d)62+c62−d
15(1+76)(15,1140)
15(2+75)(30,1125)92−106321(1+54)(21,1134)
15(3+74)(45,1110)21(2+53)(42,1113)
15(4+73)(60,1095)....
15(5+72)(75,1080)21(10+45)(210,945)
15(6+71)(90,1065)21(11+44)(231,924)293−862
........
15(76+1)(1140,15)21(54+1)(1134,21)
Table IIc (p=1155, r=379)
33(35)(a,b)62+a62−b77(15)(c,d)62+c62−d
33(1+34)(33,1122)
33(2+33)(66,1089)77(1+14)(77,1078)
33(3+32)(99,1056)77(2+13)(154,1001)
33(4+31)(132,1023)77(3+12)(231,924)293 −862
33(5+30)(165,990)77(4+11)(308,847)
33(6+29)(198,957)77(5+10)(385,770)
33(7+28)(231,924)293−86277(6+9)(462,693)
........
....77(10+5)(770,385)832−323
........
....77(13+2)(1001,154)1063−92
33(34+1)(1122,33)77(14+1)(1078,77)

Table of Valid Pairs

It was shown in Part IVb that it is possible to have generate all the terms in one table. The same is possible with the larger number 1155. Column one of Table IId shows the ordered pairs, employed in all of the above tables, that are required to produce each term in column 2 and 3 when 62 is added to a or 62 subtracts b. If the p1 (= 3, 5, 7 or 11) 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 p2p3p4 is the composite number.

For instance, when p1 = 7 and (a,b) = (506,649) division of a or b by 7 leaves 2 and 5, respectively, as remainders. Therefore, x = 568 and −587, will not appear together as terms in Table IIe where p1 = 7, although their exact opposites will. Thus, for p = 1155 the four tables composed of a single prime, p1, multiplied by a composite number of three primes produces only 7×2 terms per table along with the initial and final terms in the first and last rows. Note that terms present in each subtable are labeled as o and terms not present as ×.

Table IId (p=1155, r=379)
(a,b)62+a62−bp1=3p1=5p1=7p1=11
(0,1155)62−1093oooo
(30,1125)92−1063oo××
(140,1015)202−953×oo×
(231,924)293−862o×oo
(261,894)323−832o×××
(275,880)337−818×o×o
(371,784)433−722×× o×
(506,649)568−587×××o
(525,630)587−568ooo×
(660,495)722−433oo×o
(756,399)818−337o×o×
(770,385)832−323×ooo
(800,355)862−293×o××
(891,264)953−302o××o
(1001,154)1063−92××oo
(1031,124)1093−62××× ×

The terms in Table IIe run thru numbers 1 to 164 and give positions where the pair of terms are found starting at 7(20+145) thru 7(143+23) with the requisite term values taken from Table IId where o is in red. So all the terms except for the initial and final are to be found as a mix of positive and negative terms in a table constructed with p1 = 7 as prime and a pc composite number = 165, broken down into sums. Similar results are obtained from the other three p1 primes.

Table IIe (p=1155, r=379, p1=7, pc=165)
p1(pc)(a,b)62+a62−b
7(20+145)(140,1015)202−953
7(33+132)(231,924)293−862
7(53+112)(371,784)433−722
7(75+90)(525,630)587−568
7(108+57)(756,399)818−337
7(110+55)(770,385)832−323
7(143+22)(1001,154)1063−92

Sequences from the Tables

The terms obtained from the tables along with the initial and final values were strung together in two sequences, one in which the negative terms were added to the left of 62 and the positive to the right in sequential order (see Table III rows two and four). Ten values, however, were converted to their opposite values before placement into the sequence. The second sequence was generated by taking the absolute values of all the x terms and stringing together each term in sequential order starting with the lowest positive x = 62 and proceeding to the highest, 1093 (in blue). By subtracting the first 14 Δ2 values from 1155 we get the value of 124 which is used to connect to the next term 1217 and consequently higher x terms.

Table III (p=1155, r=379)
Δ1-121-110-154 -231-44-201-154140
x-953-832-722-568-337 -293-9262202
Δ1-121110154 23144201154140121
x3234335878188621063 12171357
Δ230110913014 9613519
|x|6292202293323 337433568587
Δ213596143091110 3012430
|x|722818832862953 106310931217

A JS program is used to confirm the values of each each term in the sequence. A JS text program is also avaiable for viewing.

JS Program 1155 Program   (a copy of the text file is available on 1155 text)

And to conclude the Δ1 terms shown in row five and six above can be interpreted as 1)Each equal to the sum of a nested pair of Δ2 terms as shown in Table IV where the left Δ2 term is added to the Δ2 term to its right or as 2)A pair formed by hopscotching from one term to another in the left direction. Either description may be correct.

Table IV Sums of Nested Pairs
19+135=154135+96=23196+14=11014+30=44
30+91=12191+110=201110+30=14030+124=154

Go to Part IVd where p is an even number and, therefore, the initial and final values are indeed represened in the table.

Go back to Part IVb. Go to homepage.


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