Let $(f\_1, f\_2, \ldots, f\_n)$ be an $n$-tuple of functions mapping non-negative integers to non-negative integers. Let $m$ be a positive integer.Suppose there exists a function $f$ apping non-negative integers to non-negative integers such that:  

$$[f\_1(a\_1) + f\_2(a\_2) + \cdots + f\_n(a\_n)] \bmod{m}= f[(a\_1 + a\_2 + \cdots + a\_n) \bmod{m}].$$
Mod here is used as a function. Can one find or describe all such $n$-tuples with the following characteristics?



Linear functions
You can view $f$ and all the $f\_i$ as functions $\mathbb{N}\cup\{0\}\to\mathbb{Z}/m$.
Do so. 
For $n=1$ every $f\_1$ will do. I am assuming now $n\geq 2$.


Note that replacing each $f\_i$ by $f\_i-f\_i(0)$ and $f$ by $f-\sum f\_i(0)$ will not change the desired property, so assume $f\_i(0)=0$.


Choosing $a\_i=x$, $a\_j=0$ for $j\neq i$ we see that $f(x)=f\_i(x)$.
Thus all the $f\_i$ are the same and equal $f$. I will drop the index $i$ of the $f$'s.
Fix $a\_i=0$ for $i\geq 3$. Get $f(x)+f(y)=f(x+y)$. Denote $a=f(1)$ and prove by induction that $f(x)=xa$.


Conclude: as functions $\mathbb{N}\cup\{0\}\to\mathbb{Z}/n$ all the $f\_i$ are given by "affine maps" $x\mapsto xa+b\_i$ for some $a,b\_i\in\mathbb{Z}/m$
(same $a$ and $b\_i=f\_i(0)$). 


Finally, observe that every $a,b\_i\in \mathbb{Z}/m$ will result in a good definition of $f\_i(x)=xa+b\_i$, $f=xa+\sum b\_i$, so the answer is complete.


