I'm trying to combine floor functions for a problem I'm working on.
Given that $m$ and $n$ are integers:
- Is there a way to write $\mathbb{floor}(\frac{m-1}{n})$ in terms of $\mathbb{floor}(\frac{m}{n})$?
- Is there a way to simplify $\mathbb{floor}(\frac{m}{n})-\mathbb{floor}(\frac{m-1}{n})$?
- Is there a way to simplify $\mathbb{floor}(\frac{m}{n})+\mathbb{floor}(\frac{m-1}{n})$?
- Is there a way to simplify $\mathbb{floor}(\frac{m}{n})+1$? ($\mathbb{floor}((\frac {m+1}n)$--Solved by J.W. Tanner)
- Is there a way to write $\mathbb{floor}^2(\frac{m}{n})$ to remove the exponent (similar to $\sin^2(x)=\frac 12-\frac12\cos(2x)$)?
This can be useful when working with the floor function. Consider the sequence $\frac1b, \frac2b, \frac3b, \ldots,$ and think about taking the floor of each term. When is $\operatorname{floor}\left(\frac{a+1}{b}\right) > \operatorname{floor}\left(\frac ab\right)$? $$ \operatorname{floor}\left(\frac{m-1}{n}\right)= \begin{cases} \operatorname{floor}\left(\dfrac{m}{n}\right) - 1 & \text{if $n$ divides $m$,} \\ \operatorname{floor}\left(\dfrac{m}{n}\right) & \text{otherwise.}\end{cases} $$
You can take this and apply it to parts $(2)$ and $(3)$. Is the result "simpler" than before? I don't think so, but depending on what you're doing with those expressions, the substitution can be useful. Notice that if you have multiple occurrences of $\operatorname{floor}\left(\frac{m-1}{n}\right)$ in a single equation, you still only have two cases to be concerned with ($n$ divides $m$ or it does not), and you can replace all the occurrences of $\operatorname{floor}\left(\frac{m-1}{n}\right)$ simultaneously.
For $(4)$, there are other ways to write the same thing, but are they "simpler"? The form you have in $(4)$ may be the most useful form for most purposes already.
For $(5),$ \begin{align} \operatorname{floor}\left(\dfrac{m}{n}\right) \operatorname{floor}\left(\dfrac{m+n}{n}\right) &= \operatorname{floor}\left(\dfrac{m}{n}\right) \left(\operatorname{floor}\left(\dfrac{m}{n}\right) + 1\right) \\ &= \left(\operatorname{floor}\left(\dfrac{m}{n}\right)\right)^2 + \operatorname{floor}\left(\dfrac{m}{n}\right) \\ \end{align}
And that is why I have so many doubts about the usefulness of "simplifying" example $(4).$ It seems more useful to go in the other direction, from something else to $(4)$.