Factorize a composite number

86 Views Asked by At

Is the following true?

Let $n$ be a composite number in base $b$.

a) Let $R$ be the rational period of $\frac{1}{n}$ in base $b$. This number is of length $k$ where $k$ in turn is also a composite number, substantially smaller than $n$;

b) Choose a non-trivial divisor $d$ of $k$ and calculate $R' = R \ (\text{mod } b^d-1)$;

c) Calculate $M = \gcd(R', b^d-1)$;

d) Calculate $P = (b^d-1)/M$.

Then $P$ is a prime factor of $n$.


For example let $n=1259879$. Then $\frac{10^{35}-1}{n} = 79372701664207435793437306281$

$1$) $$R \ (\text{mod } 10^7-1) = 6900408 \\ \gcd(9999999,6900408) = 2151 \\ \frac{9999999}{2151} = 4649$$

$2$) $$R \ (\text{mod } 10^5-1) = 83394 \\ \gcd(99999,83394) = 369\\ \frac{99999}{369} = 271$$

$$\rightarrow 271 \cdot 4649 = 1259879$$