Fast Approach to Factorize Odd Integers with Special Divisors

Corresponding Authors: Xingbo Wang Department of Mechatronic Engineering, Foshan University, Foshan City, PRC, 528000, China Email: 153668@qq.com Abstract: The paper proves that an odd composite integer N can be factorized in O((log2N)) bit operations if N = pq, the divisor q is of the form 2u +1 or 2u-1 with u being an odd integer and  being a positive integer and the other divisor p satisfies 1 < p  2 +1 or 2 +1 < p  2-1. Theorems and corollaries are proved with detail mathematical reasoning. Algorithm to factorize the odd composite integers is designed and tested in Maple. The results in the paper demonstrate that fast factorization of odd integers is possible with the help of valuated binary tree.


Introduction
A Valuated Binary tree is a full perfect binary tree that has odd integers bigger than 1 put on it from top to bottom and left to right, as introduced in Wang's (2016a). With the help of the valuated binary tree, many new properties of the odd integers are discovered. For example, the properties of symmetric nodes and symmetric common divisors, the properties of subtree duplication and subtree transition and the properties of sum by level, root division and uniform sum were discovered in (Wang, 2016b;2017a), the genetic properties of odd integers was disclosed in (Wang, 2017b) and the periodical divisibility traits along the leftmost path or the left side-path of the tree were demonstrated in (Wang and Guo, 2019). All these new properties enable us to know the integers in a different point of view, as stated and investigated in Wang's (2018). Integer factorization has been a hard problem in number theory and in cryptography over years, as overviewed in Yan's (2013), Sarnaik's et al. (2016) and Phulachand's (2016). Any new approach related with the integers shall of course be tried on the issue. Wang (2017b) proved that there should exist an algorithm of O(log2N) searching steps to factorize an odd integer N. But there has not been a convincible demonstration. Thereby, this paper, continues the studies on integer factorization and proves that there are odd integers that can be factorized in O(log2N) searching steps or in O((log2N) 4 ) bit operations.

Definitions and Notations
A valuated binary tree T is such a binary tree that each of its nodes is assigned a value. An odd number Nrooted tree, denoted by TN is a recursively constructed valuated binary tree whose root is the odd number N with 2N-1 and 2N +1 being the root's left and right sons, respectively. Each son is connected with its father via a path, but there is no path between the two sons. T3 tree is the case N = 3. For convenience, symbol N(k, j) is by default the node at position j on level k of T3, where k = 1, 2, and j = 0,1,, 2 k -1. Symbol   , N kj N is to denote the node at position j on level k of TN, where k = 1,2, and j = 0,1,,2 k -1. Symbol Xl(TN) means node X is in the left branch of TN while symbol Xr(TN) means X is in the right branch of TN.
and symbol N L P to indicate the path defined by N L P = {N(1,-1),, N(i,-1),,…}, which is also called a left side-path, as depicted in Fig. 1. The leftmost path and the rightmost path together with their side-paths respectively are in all called border-path or simply border.
In this whole article, symbol x denotes the floor function, an integer function of the real number x such that x-1 < x  x or equivalently x  x < x +1. Symbol a|b means b can be divided by a; symbol (a, b) is to express the Greatest Common Divisor (GCD) of integers a and b. A tracing step or a searching step is the computation of a father based on a son or vice versa.

Lemma 3 (Floor Function, see in (Wang, 2019))
Properties of the floor functions with real numbers x and y and integers n:

Main Results and Proofs
Theorem 1

Theorem 2
Let p > 1 be an odd integer and  be a positive integer; if 2  +1 < p  2 +1 -1 then it holds: and:

Proof
See the following deductions:

Proof
Without loss of generality, assume 1< p  N  q. Then By Lemma 3 (P13) and (P32): Hence it holds:

Corollary 1
Suppose p and q are odd integers with 1 < p < q; then N = pq can be factorized in log2N +1 searching steps if one of p and q is in the form 2  +1 or 2  -1 with  being a positive integer.

Proof
According to the given conditions, there are 4 cases, Referring to Lemma 1 and Theorem 1, it yields: This implies that N is a node in the right branch of Tp.
Consequently, there are at most  steps by tracing upwards and finding out the GCD between N and its ancestors in Tp. Since q = 2  +1, it yields: For the case p = 2  +1 or p = 2  -1, by Lemma 2, it knows respectively. Since   log2 p +1, by genetic property it knows p can be found in at most 2 log2 p +1 steps by tracing downwards and finding the GCD between N and nodes along the leftmost path or left side-path of TN.

Proposition 1
Suppose p and q are odd integers with 1 < p < q; then N = pq can be factorized in log2N +1 searching steps if q is in either form of 2  -1 and 2  +1 with  being a positive integer.

Corollary 2
Let p and q be odd integers with 1 < p < q and suppose q = 2  u +1 with u  1 being an old integer,  being a positive integer and 1 < p < 2  +1; then N = pq can be factorized in log2p +1 searching steps.

Proof
The condition q = 2  u +1 leads to: This says that N is a node in the right branch of Tup. Thus there are at most  searching steps to trace upwards and find out the GCD between N and its ancestors in Tup.  Figure  6 shows the tracing path from 6707 to 209. Seen from the figure, N = 6707 is sure in the right branch of T209.

Corollary 3
Let p and q be odd integers with 1 < p < q and suppose q = 2  u-1 with u  1 being an old integer,  being a positive integer and 1 < p < 2  +1; then N = pq can be factorized in log2 p +1 searching steps.

Proof
By Theorem 1, the condition 1< p <2  +1 leads to 0  2 -1 - Thus there are at most  searching steps to trace upwards and find out the GCD between N and its ancestors in Tup.

Corollary 4
Let p and q be odd integers with 1 < p < q and suppose q = 2  u +1 with u  1 being an old integer,  being a positive integer and 1 < p < 2  -1; then N = pq can be factorized in log2p +1 searching steps.

Proof
By Theorem 1, the condition 1< p <2  -1 leads to 2 -1 < 2 -1 + 1 2 p  < 2  -1. Since: it knows that N is a node in the right branch of Tup. Thus there are at most  searching steps to trace upwards and find out the GCD between N and its ancestors in Tup.

Corollary 5
Let p and q be odd integers with 1 < p < q and suppose q = 2  u-1 with u  1 being an old integer,  being an positive integer and 1 < p < 2  -1; then N = pq can be factorized in log2p +1 searching steps.

Proof
By Theorem 1, the condition 1 < p < 2  -1 leads to 0 it knows that N is a node in the left branch of Tup. Thus there are at most  searching steps to trace upwards and find out the GCD between N and its ancestors in Tup.
Example 8 Let N = 383031;then N's ancestors are 191515, 95757, 47879, 23939, 11969, 5985 and 2993, among which GCD(383031, 2993) = 73, which results in Figure 9 shows the tracing path from 383031 to 2993. Seen from the figure, N = 383031 is sure in the left branch of T2993. Let N = pq be an odd integer with p and q being odd integers and 1 < p < q; suppose q = 2  u 1 with u  1 being an old integer, and 1< p  2  1; then N can be factorized in log2N +1 steps or in O((log2N) 4 ) bit operations.
Seen from the table and referring to the Corollaries 1 to 5, it knows the theorem holds considering it needs O((log2N) 4 ) bit operations in computation of the GCD at each step.

Corollary 6
Let N = pq be an odd integer with p and q being odd integers and 1 < p < q; suppose q = 2  u-1 with u  1 being an old integer and  being an positive integer; if 2  +1 < p  2  +1 -1 then N can be factorized in log2N +1 searching steps.

Corollary 7
Let N = pq be an odd integer with p and q being odd integers and 1 < p < q; suppose q = 2  u +1 with u  1 being an old integer and  being an positive integer; if 2  +1 < p  2  +1 -1 then N can be factorized in log2N +1 searching steps.

Theorem 5
Let N = pq be an odd integer with p and q being odd integers and 1 < p < q; suppose q = 2  u 1 with u being an old integer and  being an positive integer; if 2  +1 < p  2  +1 -1 then N can be factorized in 3log2N +1 searching steps or in O((log2N) 4 ) bit operations.

Proof
Summarizing Corollaries 6 and 7 yields to Table 2. Table 2 shows that, N is a node of Tup+2 or Tup-2. Hence it easy to trace upwards from N to up +2 or up-2 and then find out the divisor p. The time complexity is demonstrated in section 4.1.

Algorithm and Numerical Experiments
Algorithm Theorems 4 and 5 provide an approach to factorize rapidly a composite odd integer N = pq if q is in the form q = 2  u 1 and p satisfies 1 < p  2  1 or 2  +1 < p  2  +1 -1. This section presents a factoring algorithm. The whole procedure includes two subroutines and a main routine as follows.

Numerical Experiments with Maple 15
With the algorithm, programs in Maple are designed as list in the appendix. With the programs, ten odd integers are factorized in milliseconds in Maple. The ten numbers are list in Table 3. The biggest one is a 25 decimal-digit number 5057672949897463733694209.

Conclusion and Future Work
Looking through the theorems and corollaries proved in previous sections, one can easily know that, for an odd composite integer N = pq with q being in the form of 2  u 1 and p satisfying 1 < p  2  1 or 2  +1 < p  2  +1 -1, it is easy to factorize N with the help of the valuated binary tree TN. Actually, the factorization can be completed by just tracing and finding in TN the GCD between N and N's ancestors or between N and the leftmost path 0 N P as well as the left side-path N L P . Since there are a lot of odd positive integers that fit the conditions, this paper surely solves part of the problem on factoring big odd integers.
Meanwhile, readers can see from the list of bibliographies and their related references that, the tree method is in deed a valid method to study integers. This leads to the future work. Hope more gougers join the study and solve the hard problem of integer factorization.