Factorization by multiplying and representation as difference of two squares

60 Views Asked by At

Definition 1.$$R: \mathbb N \to \mathbb N: \ R(n) = \lceil\sqrt{n}\rceil^2-n.$$ This is the distance from $n$ to the smallest square greater or equal to $n$.

Definition 2.

Let $a$ be as positive integer, $0<a<n$ and $$R(R(a n))=0.$$ We call such an $a$ a $multiplier$ of $n.$

Theorem 1.

Every number $n>2$ has a multiplier.

Proof: $(n-2)n = n^2 - 2n = (n-1)^2-1.$ Thus $R((n-2)n) = 1 = 1^2.$

Definition 3.

Given a multiplier $a$ of $n$, if $$1<\gcd(n,\sqrt{R(a n)}+\sqrt{R(a n)+a n})<n,$$ we say $a$ is $nontrivial$.

Example:

Take $ n= 403859$. The smallest nontrivial multiplier, by brute force, is $57.$ Now $$\gcd(n,\sqrt{R(a n)}+\sqrt{R(a n)+a n}) = \gcd(403859,29+4798) = 1609.$$

Construction 1.

Let $n=p q$ be an odd semiprime. Let $s$ and $k$ be positive integers. Then we can write $$s k n = \left(\frac{s q + k p}{2}\right)^2 - \left(\frac{s q - k p}{2}\right)^2. \ \ \ \ \ (1)$$

Theorem 2.

Every odd semiprime has a nontrivial multiplier.

Proof (sort of):

Let $s$ be a positive integer and let $k$ be a positive integer with the same parity as $s$ in the interval $$\left(\frac{q s-2 \sqrt{2 q s}+2}{p},\frac{q s+2 \sqrt{2 q s}+2}{p}\right).$$ Then every multiplier of $n$ is of the form $s k$. This can be proven by writing the product as difference of squares as in (1) and using properties of $R.$

Now let $$s = \left\lceil \frac{p^2}{8 q}\right\rceil $$ and $$k^* = \left\lceil \frac{q s -2 \sqrt{2 q s }+2}{p}\right\rceil.$$ Select $k = k^*$ if $k^*$ has the same parity as $s$, otherwise $k = k^*+1.$ Then $s k$ is a nontrivial multiplier of $n$.

We get this by assuming the length of the interval containing $k$ in theorem 2 is longer than $2$, to ensure we have numbers of same parity, and surprisingly the smallest possible solution also gives us a working solution. This can be proven by using the definition of nontriviality of a multiplier. Usually $s k$ is not optimal. This also works of $n$ is any odd composite number and $p q = n$, where $p$ and $q$ are nontrivial factors of $n$ and $p<q.$

The idea is that if we know a nontrivial multiplier $a$ of $n$, we can trivially represent $a n$ as a difference of two squares and, knowing $a$ and the fact that it is nontrivial, we can find a nontrivial divisor of $n$.

The problem, obviously, is that we still need to know the divisors of $n$ in order to find a nontrivial multiplier. We can, of course, seek such a multiplier by brute force but this can be time consuming if $n$ happens to have a large smallest nontrivial multiplier.

Is some way to calculate such a nontrivial multiplier or get a nontrivial lower bound for it, without needing to know the divisors. I have tried replacing $p$ and $q$ by $\sqrt{n}$ or $n$ in various ways to try to get a trivial estimate for $s$ and $k$ in the general solution above, but this has always ended in the solution being "too" trivial for any use.

Note that we can also get an $s k$ by calculating a solution to the Diophantine equation $$s q - k p = 2,$$ which always has a suitable solution. This too uses construction (1).