Solving Fractional Diophantine Equations

237 Views Asked by At

As my search to create an efficient factorization algorithm continues, I stumbled upon this equation for one of my test cases:$$\dfrac{3-n^2}{2n-12}=k$$ To continue, I need to know what integer values of $n$ make $k$ an integer. Since I want this to be a factorization algorithm, I would like methods that don't include factoring; and since I want this to be efficient, I would like methods that doesn't include checking between a range. Other than those two exceptions, any method is accepted, no matter how complicated (I can always optimize it later).

1

There are 1 best solutions below

1
On BEST ANSWER

Hint: If $A=\frac{3-n^2}{2n-12}$ has to be an integer, so does $2\cdot A$ $$=\frac{-2n^2+6}{2n-12}=-n-\frac{3-6n}{n-6}=-n-\frac{-6(n-6)-33}{n-6}=-(n+6)-\frac{33}{n-6}$$ and hence, you're looking for values of $n$, for which

$$\frac{33}{n-6}\in\mathbb Z$$