Let $N \in \mathbb{N}$ be constant. Find all non-decreasing functions $f:\mathbb{Z} \rightarrow \mathbb{Z}$ satisfying $$f(n) + f(n+1) + ... + f(n+N-1) = n$$ for all integers $n$.
Please check my solution.
$$ f(n) + f(n+1) + ... + f(n+N-1) = n \tag{1} $$
$$ f(n+1) + f(n+2) + ... + f(n+N) = n+1 \tag{2} $$
(2)-(1):
$$ f(n+N) - f(n) = 1 $$
As $f$ are non-decreasing function, so $\{f(n+1), f(n+2), ..., f(n+N-1)\} \in \{f(n)$ or $f(n)+1\}$
If $f(n+l), f(n+l+1), ...,f(n+N-1) = f(n)+1$
and $f(n+l)$ has the smallest value that is equal to $f(n)+1$
then $f(n+l-N), f(n+l+1-N), ..., f(n-1) = f(n)$
and $f(n), f(n+1), ..., f(n+l-1) = f(n)$
There would exist $k\in \mathbb{N}$ such that $f(k), f(k+1), ..., f(k+N-1)$ are all equal
and the solution would be $k\cdot f(n)+(N-k)(f(n)+1)=n$
i.e., $f(n) = \frac{n-N+k}{N}$, Contradiction
Therefore, $\{f(n+1), f(n+2), ... , f(n+N-1)\}$ are all equal where $n \equiv 0 (\bmod N)$
My answer is $f(n) = \left\lfloor \frac{n}{N} \right\rfloor$ where $n\in \mathbb{Z}$
Check :
Let $\left\lfloor \frac{n}{N} \right\rfloor = l, n = Nl+t$
$\Rightarrow f(n)=f(n+1)=...=f(n+N-2-t)=l$
$f(n+N-1-t)=f(n+N-1) = ...=f(n+N-1)$
so $f(n)+f(n+1)+...+f(n+N-1) = l(N-1-t) + (l+1)(1+t) = Nl +t $