# What is the Name of This Problem?

Given two integers $a$ and $b$, determine if $a$ and $b$ are equivalent modulo any $k \, (k: 1 \lt k \lt |a - b|)$.

If $\exists$ an integer $(k: 1 \lt k \lt |a - b|) \text{ and }a \equiv b \mod k$, then the algorithm would return true, otherwise it would return false.

I thought of this problem today.

Before attempting to solve it, I want to know if there is existing literature on the problem. However, I would need to know the problem to do research on it.

• @miracle173 Could you please state clearly what your requirement is? And why do you need them? – fade2black Jul 24 '17 at 17:34
• I have edited the question. – Tobi Alafin Jul 24 '17 at 21:33
• The title you have chosen is not well suited to representing your question. Please take some time to improve it; we have collected some advice here. Thank you! – D.W. Jul 24 '17 at 22:10

You just need to check if $|a-b|$ is divisible by a some integer $k$. You can reduce it to the integer factorization problem if you are not interested in the trivial divisors 1 and $|a-b|$.