I am looking for the full solution for $a$ to the floor function equation where $\left\lfloor{\frac{N}{a}}\right\rfloor = \left\lfloor{\frac{N}{p}}\right\rfloor - a$. I have tried the quadratic solution when dropping the floor functions and this does identify most of the solutions for $a$. However there are a few more solutions that are not identified by this method. The conditions are $p > 1$ (actually $p$ is prime), $N \ge {p}^{2}$, $a > 0$, and $N, a, p \in \mathbb{Q}$, and $1 \le a \le N$.
Also I am using Mathematica and it does handle equations with floor functions when using Solve or Reduce. For example Mathematica does not solve $\left\lfloor{a}\right\rfloor = 0$ where the solution is $0 \le a < 1$.