Solve $\lfloor x \rfloor = ax+1$ for integral $a$ Solve $\lfloor x \rfloor = ax+1$, where $a$ is an integer.
I have found the values of $x$ for $a=0$, $a=1$ and $a=-1$. But I don't know how to continue. How can  I find the solutions for integral $a\leq-2$ and $a\geq2$ ?
 A: When $a=0$ there are infinite solutions , they are clearly $x\in [1,2)$. We now assume $a\neq 0$.
Since $\lfloor x \rfloor$ is an integer we conclude $ax+1$ is an integer, so $x=\frac{k}{a}$ for some $k$.
We must therefore find all the integer values for $k$ such that $\lfloor \frac{k}{a} \rfloor=k+1$.
It is clear that if $k$ is non-negative then $\lfloor \frac{k}{a} \rfloor < k+1$.
Now, if $k$ is negative we have $\lfloor \frac{k}{a} \rfloor = - \lceil \frac{-k}{a} \rceil$.
So we must find the non-negative integer values of $l$ so that $\lceil \frac{l}{a} \rceil= l-1$
$l=0$ never works 
$l=1$ works if and only if $a$ is negative and $a\neq -1$.
$l=2$ works if and only if $a$ is positive and $a\neq1$.
$l=3$ works if and only if $a=2$.
$l=4$ never works.
Finally $l> 4$ does not work for any $a$, clearly not for $a=1$, and if $a\neq 1$ we have:  $\lceil\frac{l}{a}\rceil\leq \frac{l}{a}+1\leq \frac{l}{2}+1< l-1$.
We conclude the solutions are as follows:
If $a<-1$ we have $x =\frac{-1}{a}$.
If $a=-1$ we have no solutions.
If $a=0$ we have $x\in(1,2]$.
If $a=1$ we have no solutions.
if $a=2$ we have $x\in \{\frac{-2}{a},\frac{-3}{a}\}$.
If $a>2$ we have $x = \frac{-2}{a}$.
