# How to minimize the difference of two factors when prime factorization is available

There are nonzero natural numbers ($\geq 1$) $a,b,c,d$.

$c$ is fixed, and prime factorization of $c$ is available. The prime factorization of $c$ always have the same nonzero exponent - that is $2^z3^z5^z...$ where $z$ is the exponent. And

$$ab=cd=e$$

We define another nonzero natural number $$k = \frac{c}{p^z}$$ where $p$ is some prime factor of $c$.

The question is, what would be a way to minimize $|a-b|$ while $a+b$ is multiples of $k$? I wish to find the method for every possible number of prime factors in $c$.

(If $z=1$ and $c$'s prime factors being all prime numbers from 2 to some number makes cases much easier, that's also fine.)

Difference is nonzero, and $a,b,d$ can be set freely as long as they satisfy constraints.

-
possible duplicate of Integer factorization that satisfies factor multiplication constraints --- probably a better idea to edit the old question than to post a new one while the old is unresolved. – Gerry Myerson Nov 3 '12 at 5:09
I just deleted the question, as I found no way to rescue it... It was too unclear from beginning. – La Ventana Nov 3 '12 at 9:14
Maybe it would be better if you just explained why you are interested in such a bizarre-looking question. – Gerry Myerson Nov 3 '12 at 11:29
I am working through some "joke" assignments... That's why. Haha. That's why it seems bizarre - as it is part of my attempts trying to solve a problem. May be flawed, but just trying. Isn't it better to try one's own approach? :) – La Ventana Nov 3 '12 at 11:31

## 1 Answer

You should try using the de lesui approach

-
what is that? google search didn't bring anything.... – La Ventana Nov 2 '12 at 23:27
Your answer should try giving more details. – levap Nov 2 '12 at 23:49
Please describe, or at least give a reference to, this approach. – robjohn Nov 3 '12 at 5:35