proof involving floor functions

59 Views Asked by At

I am looking at a problem that roughly says

If $a,b \in [0,1)$, and $\lfloor na\rfloor+\lfloor nb\rfloor=\lfloor n(a+b)\rfloor$ for every $n\in\mathbb{N}$, then $a=0$ or $b=0$.

The proof that was supplied was the following:

Assume $ab\neq 0$ and write $a=2^{-a_1}+2^{-a_2}+\ldots+2^{-a_s}$, and $b=2^{-b_1}+2^{-b_2}+\ldots+2^{-b_t}$, and wlog let $b_t\geq a_s$. Then taking $n=2^{b_t}-1$ gives $$\lfloor na\rfloor+\lfloor nb\rfloor=\Big\lfloor \sum_i 2^{b_t-a_i}-a\Big\rfloor+\Big\lfloor \sum_i 2^{b_t-b_i}-b\Big\rfloor=\sum_i 2^{b_t-a_i}-1+\sum_i 2^{b_t-b_i}-1,$$ whereas the RHS becomes $$\lfloor n(a+b)\rfloor=\Big\lfloor\sum_i 2^{b_t-a_i}+\sum_i 2^{b_t-b_i}-a-b\Big\rfloor=\sum_i 2^{b_t-a_i}+\sum_i 2^{b_t-b_i}-1,$$ a contradiction.

However as far as I can see this only applies if $a,b$ have finite decimal representations in base 2. Once one generalises to arbitrary $a,b\in[0,1)$ I think this proof becomes insufficient.

So I was wondering if there is a proof that can show this result for all such $a,b$, or if this result actually fails without the assumption that $a,b$ have finite base 2 decimal representations.