# Conditions on a rational number such that there exist equidistant integers?

Take some rational number in reduced form $p = \frac{a}{b}$. Now consider two integers $x_1,x_2$ that have the same distance from $p$, that is $|x_1 - p| = |x_2 - p|$. Are there any restrictions on $p$?

My problem statement is a little fuzzy but hopefully this'll help explain what I mean

\begin{align*} &\big|x_1 - \frac{a}{b} \big| = \big| x_2 - \frac{a}{b} \big| \\ &\implies x_1^2 - \frac{2ax_1}{b} = x_2^2 - \frac{2ax_2}{b} \\ &\implies (x_1 - x_2) \big(x_1 + x_2 - \frac{2a}{b} \big) = 0\\ \end{align*}

This shows that if $x_1, x_2$ are distinct integers with the same distance from $p$, then $x_1 = \frac{2a}{b} - x_2$. In other words, $b$ must be $2$ in order for $x_1$ to be an integer. Does this imply that, taking the example of $p = \frac{1}{3}$, there are no 2 distinct integers with the same distance from $p$?

## 1 Answer

Think about it this way: the midpoint of any two integers $m$, $n$ is $\frac{m+n}{2}$. This means that $p$ must have denominator $2$. So yes, you're correct.

• Oh darn that's so much simpler... – Airdish Mar 21 '17 at 15:47