A natural number $n$ is given. Determine all $(n-1)$-tuples of nonnegative integers $a_{1}, a_{2}, \ldots, a_{n-1}$ such that

$$
\left[\frac{m}{2^{n}-1}\right]+\left[\frac{2 m+a_{1}}{2^{n}-1}\right]+\left[\frac{2^{2} m+a_{2}}{2^{n}-1}\right]+\left[\frac{2^{3} m+a_{3}}{2^{n}-1}\right]+\cdots+\left[\frac{2^{n-1} m+a_{n-1}}{2^{n}-1}\right]=m
$$

holds for all $m \in \mathbb{Z}$.
Proposed by Serbia
1. We will show that there is a unique such $n$-tuple: $a_{k}=2^{n-1}+2^{k-1}-1$ for $k=1, \ldots, n-1$.
Write $N=2^{n}-1$ and $f_{k}(x)=\left[\frac{2^{k} x+a_{k}}{N}\right]$ for $k=0,1, \ldots, n-1$, where $a_{0}=0$. Since

$$
\sum_{k=0}^{n-1} f_{k}(m)-\sum_{k=0}^{n-1} f_{k}(m-1)=1
$$

for each $m \in \mathbb{Z}$, there is exactly one $k$ for which $f_{k}(m)=f_{k}(m-1)+1$. We work modulo $N$. The last equality holds if and only if $2^{k} m+a_{k} \in\left\{0,1, \ldots, 2^{k}-1\right\}$. I.e. if and only if

$$
2^{k} m \in\left\{-a_{k}, 1-a_{k}, \ldots, 2^{k}-1-a_{k}\right\}
$$

Multiplying with $2^{n-k}$, and noting that $2^{n} \equiv 1 \bmod N$, we get the following:
For each $m \in \mathbb{Z}$ there is a unique $k \in\{0,1, \ldots, n-1\}$ such that $m \in B_{k}$ (modulo $N$ ) where

$$
B_{k}=\left\{b_{k}, b_{k}+2^{n-k}, \ldots, b_{k}+\left(2^{k}-1\right) 2^{n-k}\right\}
$$

with $b_{k}=-2^{n-k} a_{k}$. Therefore the problem condition is equivalent to $\bigcup_{k=0}^{n-1} B_{k}$ being a partition of $\{0,1, \ldots, N-1\}$.

For a number $b$ and set a $A \subseteq \mathbb{Z}$ we write $b+A=\{b+a: a \in A\}$. With this notation, $B_{n-1}=b_{n-1}+\left\{0,2,4, \ldots, 2^{n}-2\right\}$. The set $B_{n-2}=b_{n-2}+\left\{0,4,8, \ldots, 2^{n}-4\right\}$ is contained in $\overline{B_{n-1}}=b_{n-1}+\left\{1,3, \ldots, 2^{n}-3\right\}$, implying $b_{n-2}, b_{n-2}+2^{n}-4 \in \overline{B_{n-1}}$, which holds only if $b_{n-2} \equiv$ $b_{n-1}+1$. Further, the set $B_{n-3}=b_{n-3}+\left\{0,8,16, \ldots, 2^{n}-8\right\}$ is contained in $\overline{B_{n-1} \cup B_{n-2}}=$ $b_{n-1}+\left\{3,7, \ldots, 2^{n}-5\right\}$, so we must have $b_{n-3} \equiv b_{n-1}+3$. Similarly, $b_{n-4} \equiv b_{n-1}+7$ etc. In general, $b_{n-k} \equiv b_{n-1}+2^{k-1}-1$ for $k=1, \ldots, n-1$. It follows that $b_{0} \equiv b_{n-1}+2^{n-1}-1$. On the other hand, we have $b_{0}=0$, which gives $b_{n-1} \equiv 1-2^{n-1}$ and therefore $b_{k} \equiv 2^{n-1-k}-2^{n-1}$. Thus $a_{k} \equiv-2^{k} b_{k} \equiv 2^{n+k-1}-2^{n-1} \equiv 2^{n-1}+2^{k-1}-1$ for $k=1, \ldots, n-1$.
Finally, $\sum_{k} f_{k}(0)=0$ implies $a_{k}<N$ for all $k$, so we conclude that $a_{k}=2^{n-1}+2^{k-1}-1$ for each $k=1,2, \ldots, n-1$.