$n$ is a divider of $c$ if and only if $n = 2(c \mod (n-1)) - (c \mod(n-2)) + 2$

107 Views Asked by At

While working on Integer factorization problem I came to this conclusion:

If and only if $n$ is a divider of $c$

$$c\mod n = 0$$

Than

$$n = 2(c \mod (n-1)) - (c \mod(n-2)) + 2$$

  • c,n are positive integers

And $c$ is a composite of two prime numbers with the same binary length, aka bit length, without leading zeroes

I found this while I been examining the mod function of $c$

$$f(n) = c \mod n$$

While I have no mathematical proof for this behavior, it seems to be working.

In this question I am not looking for such proof by simply help with this equation.

How can I extract $n$? Or how can I simplify it?

Working Example

$$437 = 19*23$$ $$23 = 2(437 \mod 22) -(437 \mod 21) + 2$$

Not working example

$$319 = 11 * 29$$ $$29 \not= 2(319 \mod 28) -(319 \mod 27) + 2$$

  • 11 and 29 does not have the same bit length.
1

There are 1 best solutions below

0
On

I found a mathematical proof to why this equation is true. How ever is not answering the question...

Here is the proof:

Lets assume that $n$ is the bigger divider such that:

$$\frac{c}{n}=a$$ $$a<n$$

  • a is a positive integer

We also know that $a$ and $n$ have the same bit count, so that means:

$$a<n<2a$$

In order to continue I will use real life example.

Lets assume that we have $c$ liters of wine and want to split it between $n$ bottles of wine.

We made it, we felt $c$ bottles with $a$ litters of wine!

Now we been asked to give one bottle away, so we used it to fill the remain $n - 1$ bottles, since $n-1$ is bigger than $a$, we left with $a$

$$c\mod n-1 = a$$

And again we been asked to give one bottle away, so we used it to fill the remain
$n-2$ bottles, since $2a$ is bigger than $n$, we successfully increased the total litter amount in the bottles to $a+1$ litters, and we left with $2a-(n-2)$ litters of wine.

$$c\mod n-2=2a-(n-2)$$

So lets get back to our equation. This is what we are getting:

$$n = 2a - (2a-(n-2)) + 2$$ $$0=0$$

So this equation is true when:

$$a<n-2<2a$$