Question: If $X$ and $N$ are positive numbers. How would I solve for $X$ in the following equation:
$$ \frac{1}{X}\bigg\lfloor-\frac{3}{2}+\frac{1}{2}\sqrt{8X+9}\bigg\rfloor=\frac{1}{N} \label{a}\tag{1} $$
?
For example If $N=7$ then $X \in \{63,70,77\}.$ If $N=6$ then $X\in\{42,48,54\}.$ Careful with $N=4.$ The floor part of the LHS of $\ref{a}$ yields the sequence: $$ 0,1,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,\ldots; $$ Here is a Wolfram Alpha "script" in the case $N=7$. You can change $7$ to another integer say $4$ etc..
Solve[Floor[-3/2 + (1/2) Sqrt[8 X + 9]]/X == 1/7, X, Integers]
Multiply by $X$ on both sides to get $$\left\lfloor-\frac{3}{2}+\frac{1}{2}\sqrt{8X+9}\right\rfloor=\frac{X}{N}$$
This shows that $X$ must be a multiple of $N$ and that $$\frac{X}{N} \le -\frac{3}{2}+\frac{1}{2}\sqrt{8X+9} < \frac{X}{N}+1$$
Multiply by $2$, add $3$, and square it to get $$\left(\frac{2X}{N}+3\right)^2 \le 8X+9 < \left(\frac{2X}{N}+5\right)^2$$
Expanding it, there are two inequalities: $$\frac{4X^{2}}{N^{2}}+\left(\frac{12}{N}-8\right)X \le 0$$ $$\frac{4X^{2}}{N^{2}}+\left(\frac{20}{N}-8\right)X+16 > 0$$
Assuming that $X, N > 0$, the first inequality means that $$X\le2N^{2}-3N \tag 1$$ and the second one means that $N<\frac{9}{2}$ or $$X<\frac{2N^{2}-5N-N\sqrt{9-20N+4N^{2}}}{2} \tag 2$$ or $$X>\frac{2N^{2}-5N+N\sqrt{9-20N+4N^{2}}}{2} \tag 3$$
$(2)$ would never be true because for $N \ge 5$, the upper bound on $X$ would be less than $N$ and $X$ has to be a positive multiple of $N$.
If $N < \frac{9}{2}$ (i.e. is in $\{ 1, 2, 3, 4 \}$), then $X = kN$, where $k$ is an integer in $[1, 2N-3]$. Otherwise, $X = kN$, where $k$ is an integer in $$\bigg(\frac{2N-5+\sqrt{9-20N+4N^{2}}}{2}, 2N-3\bigg]$$
Because $2N-5 - $ (the lower bound) $\le 1$ for $N \ge 5$, this means that this simplifies to $k \in \{2N-5, 2N-4, 2N-3\} \to X \in \{N(2N-5), N(2N-4), N(2N-3)\}$.