📜 ⬆️ ⬇️

Factorization of numbers

I would like to bring to your attention one of the variants of the composite number factorization algorithm.

As already noted [1], there are regularities in the distribution of values ​​of quadratic residues, both for simple and for composite numbers.

It is necessary to bring the known dependence [2]. If the number A , integer, positive, is equal to the product of the primes a and b , then there are always two numbers c and d such that c 2 - d 2 = A or c 2 - d 2 = nA , where n is an integer from 1 to (A - 1) . Wherein,
c 2 - d 2 = (c + d) (c - d) , i.e. (c + d) and (c - d) are multiples of divisors a and b .
')

To simplify, we consider the matrix of residuals of the composite number A = 35 , as well as in [1], presented in Fig. 1.
34one34one34one34one34one34one34one34one34one34one34one34one34one34one34one34one34one
33four27sixteen32912eleven13917one33four27sixteen32912eleven13917one33four27sixteen32912eleven139
329eighteleven22918sixteen22four23one329eighteleven22918sixteen22four23one329eighteleven22918sixteen22four
31sixteen6eleven26one31sixteen6eleven26one31sixteen6eleven26one31sixteen6eleven26one31sixteen6eleven26one31sixteen6eleven
thirty2515thirty2515thirty2515thirty2515thirty2515thirty2515thirty2515thirty2515thirty2515thirty2515thirty2515thirty
29one29one29one29one29one29one29one29one29one29one29one29one29one29one29one29one29one
281472128147212814721281472128147212814721281472128147212814
272913one272913one272913one272913one272913one272913one272913one272913one2729
26eleven6sixteen31one26eleven6sixteen31one26eleven6sixteen31one26eleven6sixteen31one26eleven6sixteen31one26eleven6sixteen
25thirty1525thirty1525thirty1525thirty1525thirty1525thirty1525thirty1525thirty1525thirty1525thirty1525thirty1525
24sixteen34elevennineteenone24sixteen34elevennineteenone24sixteen34elevennineteenone24sixteen34elevennineteenone24sixteen34elevennineteenone24sixteen34eleven
23four22sixteen18292eleveneight932one23four22sixteen18292eleveneight932one23four22sixteen18292eleveneight9
2229eightone2229eightone2229eightone2229eightone2229eightone2229eightone2229eightone2229eightone2229
21212121212121212121212121212121212121212121212121212121212121212121
20152015201520152015201520152015201520152015201520152015201520152015
nineteeneleven34sixteen24onenineteeneleven34sixteen24onenineteeneleven34sixteen24onenineteeneleven34sixteen24onenineteeneleven34sixteen24onenineteeneleven34sixteen
18922eleven232932sixteeneightfour2one18922eleven232932sixteeneightfour2one18922eleven232932sixteeneightfour
17913eleven12293sixteen27four33one17913eleven12293sixteen27four33one17913eleven12293sixteen27four
sixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteenelevenonesixteen
15151515151515151515151515151515151515151515151515151515151515151515
14211421142114211421142114211421142114211421142114211421142114211421
132927one132927one132927one132927one132927one132927one132927one132927one1329
12four13sixteen172933eleven2793one12four13sixteen172933eleven2793one12four13sixteen172933eleven279
elevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneelevensixteenoneeleven
tenthirty2025five15tenthirty2025five15tenthirty2025five15tenthirty2025five15tenthirty2025five15tenthirty2025
9eleven29sixteenfourone9eleven29sixteenfourone9eleven29sixteenfourone9eleven29sixteenfourone9eleven29sixteenfourone9eleven29sixteen
eight2922oneeight2922oneeight2922oneeight2922oneeight2922oneeight2922oneeight2922oneeight2922oneeight29
71428217142821714282171428217142821714282171428217142821714
6one6one6one6one6one6one6one6one6one6one6one6one6one6one6one6one6one
five2520thirtyten15five2520thirtyten15five2520thirtyten15five2520thirtyten15five2520thirtyten15five2520thirty
foursixteen29eleven9onefoursixteen29eleven9onefoursixteen29eleven9onefoursixteen29eleven9onefoursixteen29eleven9onefoursixteen29eleven
3927eleven332917sixteen13four12one3927eleven332917sixteen13four12one3927eleven332917sixteen13four
2foureightsixteen322923eleven22918one2foureightsixteen322923eleven22918one2foureightsixteen322923eleven229
oneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneoneone

Fig. 1 Residual matrix of composite number A = 35.

The properties of the difference of the squares of the composite number A lead to the fact that some numbers e , quadratic residues of the number A , the second column (Fig. 1), are equal to the full square of the number less than A. The numbers in the first column (Fig. 1), equidistant from e to the square root of e , are multiples of the divisors of A.

For example, for the number 17 , the first column (Fig. 1), the quadratic remainder, column 2, is 9 . It is necessary to extract the square root from 9 , add it to 17 and take it away from 17 . We obtain, (17 + 3 = 20) , 20 divided by 4 equals 5 , (17 - 3 = 14) , 14 divided by 2 equals 7 . The obtained numbers 20 and 14 are divisors of the divisors of the number A , of which with the help of the Euclidean Algorithm [3] one can always find the divisors of the number A. Similar results will be obtained for other values ​​of numbers, with quadratic residues equal to a full square. For 24 , the quadratic remainder is 16 , and multiples are divisors (24 +4 = 28) and (24 - 4 = 20) .

It should be noted that the quadratic residues (Fig. 1), column 2, are grouped symmetrically about the middle of the numerical interval of the number A , i.e. relative to the numbers (A + 1) / 2 and (A - 1) / 2 , and always have four duplicate values ​​over the entire numeric interval of the first column. For the number A = 35 (Fig. 1), these are the values 1, 4, 9, 11, 16, 29 . The numbers for which, in each half of the numerical interval of the number A , the values ​​of the quadratic residues coincide, support the following regularities. If we add and subtract from each other numbers with equal quadratic residues, we obtain multiples of the divisors of A , i.e. a and b .

For numbers 16 and 9 (Fig. 1), the quadratic remainder is 11 . Add 16 and 9 , get 25 , divide 25 by 5 , get 5 . From 16 subtract 9 , we get 7 . The values ​​found are multiples of the divisors of A.

In order to find numbers with identical quadratic residues, consider another property of the table (Fig. 1). Regarding the middle of the numeric interval A , i.e. The numbers (A + 1) / 2 and (A - 1) / 2 , quadratic residues (Fig. 1), column 2, increase by the value of the arithmetic progression. The remainder of 17 , squared, divided by 35 , is equal to 9 . For 16, the balance is 11 , for 15 there is a balance of 15 , for 14 a balance of 21 , for 13 a balance of 29 , for 12 a balance of 4 . It turns out 9 + 2 = 11 , 11 + 4 = 15 , 15 + 6 = 21 , 21 + 8 = 29 , 29 + 10 = 39 , divided by 35 , the remainder is 4 . This is characteristic of arithmetic progression dependence.

Numbers in column 1, having the same quadratic residues, are separated from each other by the sum of the terms of the arithmetic progression equal to the number A multiplied by 2n , where n takes values ​​in the range from 1 to (A - 1) . The sum of the members of an arithmetic progression equal to 2nA does not necessarily have to occupy the entire range of the number A for the numbers of members of the arithmetic progression and use the first or last of its members.

It works as follows. Number A = 35 , multiply by 2 , 35 * 2 = 70 , extract the square root of 70 , we get 8 and 6 in the remainder. To the number 8 we add 1 and multiply by 8 , we get 72 . The number 72 is the eighth position of the progression and from A multiplied by 2 , i.e. from 70 it differs by 2 units. The number 2 is the first position of the progression. It is necessary to subtract 8 from (A - 1) / 2 = 17 , we get 9 and subtract 1 from 17 , we get 16 . For 9 and 16 , the quadratic remainder (Fig. 1) is 11 . Further, 16 + 9 = 25 , 16 - 9 = 7 . Received two values ​​multiple to divisors of the number A = 35 .

More examples
Example 1
2 to the 11th degree, minus 1 equals 2047.
2047 = 23 * 89
First try.
2047 * 2 = 4094,
The square root of 4094 = 63, the remainder 125,
63 * 64 = 4032, less than 4094,
64 * 65 = 4160,
4160 - 4094 = 66, does not fall into the values ​​of the sum of the members of the progression.
The second attempt.
2047 * 4 = 8188,
The square root of 8188 = 90, the remainder 88,
90 * 91 = 8190,
8190 - 8188 = 2, this is the first member of the progression,
2047 - 1 = 2046,
2046/2 = 1023,
1023 - 90 = 933,
1023 - 1 = 1022,
1022 + 933 = 1955,
1955/85 = 23, the first divisor,
1022 - 933 = 89, the second divider.

Example 2
216527 = 293 * 739,
First try.
216527 * 2 = 433054,
The square root of 433054 = 658, the remainder is 90,
658 * 659 = 433622,
433622 - 433054 = 568, does not fall into the values ​​of the sum of the members of the progression.
Skip the description of failed attempts.
Fifth attempt.
216527 * 10 = 2165270,
The square root of 2165270 = 1471, the remainder 1429,
1471 * 1472 = 2165312,
2165312 - 2165270 = 42, this is the sixth member of the progression.
216527 - 1 = 216526,
216526/2 = 108263,
108263 - 1471 = 106792,
108263 - 6 = 108257,
108257 - 106792 = 1465,
1465/5 = 293, the first divider.
108257 + 106792 = 215049,
215049/291 = 739, the second divider.

Literature.
1. “Symmetry of numbers”, habrahabr.ru/post/218053 .
2. "Method of factorization Farm". ru.wikipedia.org/wiki/Factorization Method_Farm
3. “Euclidean Algorithm”, en.wikipedia.org/wiki/Euclide's Algorithm

Source: https://habr.com/ru/post/270117/


All Articles