Determine all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ satisfying  $$ f(f(m)+n)+f(m)=f(n)+f(3 m)+2014 $$  for all integers $m$ and $n$. (Netherlands) Answer. There is only one such function, namely $n \longmapsto 2 n+1007$.
Let $f$ be a function satisfying (1). Set $C=1007$ and define the function $g: \mathbb{Z} \rightarrow \mathbb{Z}$ by $g(m)=f(3 m)-f(m)+2 C$ for all $m \in \mathbb{Z}$; in particular, $g(0)=2 C$. Now (1) rewrites as 
$$ f(f(m)+n)=g(m)+f(n) $$
for all $m, n \in \mathbb{Z}$. By induction in both directions it follows that 
$$ f(t f(m)+n)=t g(m)+f(n) $$
holds for all $m, n, t \in \mathbb{Z}$. Applying this, for any $r \in \mathbb{Z}$, to the triples $(r, 0, f(0))$ and $(0,0, f(r))$ in place of $(m, n, t)$ we obtain 
$$ f(0) g(r)=f(f(r) f(0))-f(0)=f(r) g(0) $$
Now if $f(0)$ vanished, then $g(0)=2 C>0$ would entail that $f$ vanishes identically, contrary to (1). Thus $f(0) \neq 0$ and the previous equation yields $g(r)=\alpha f(r)$, where $\alpha=\frac{g(0)}{f(0)}$ is some nonzero constant. 
So the definition of $g$ reveals $f(3 m)=(1+\alpha) f(m)-2 C$, i.e., 
$$ f(3 m)-\beta=(1+\alpha)(f(m)-\beta) $$
for all $m \in \mathbb{Z}$, where $\beta=\frac{2 C}{\alpha}$. By induction on $k$ this implies 
$$ f\left(3^{k} m\right)-\beta=(1+\alpha)^{k}(f(m)-\beta) $$
for all integers $k \geqslant 0$ and $m$. Since $3 \nmid 2014$, there exists by (1) some value $d=f(a)$ attained by $f$ that is not divisible by 3. Now by (2) we have $f(n+t d)=f(n)+t g(a)=f(n)+\alpha \cdot t f(a)$, i.e., 
$$ f(n+t d)=f(n)+\alpha \cdot t d $$
for all $n, t \in \mathbb{Z}$. Let us fix any positive integer $k$ with $d \mid\left(3^{k}-1\right)$, which is possible, since $\operatorname{gcd}(3, d)=1$. E.g., by the Euler-Fermat theorem, we may take $k=\varphi(|d|)$. Now for each $m \in \mathbb{Z}$ we get 
$$ f\left(3^{k} m\right)=f(m)+\alpha\left(3^{k}-1\right) m $$
from (5), which in view of (4) yields $\left((1+\alpha)^{k}-1\right)(f(m)-\beta)=\alpha\left(3^{k}-1\right) m$. Since $\alpha \neq 0$, the right hand side does not vanish for $m \neq 0$, wherefore the first factor on the left hand side cannot vanish either. It follows that 
$$ f(m)=\frac{\alpha\left(3^{k}-1\right)}{(1+\alpha)^{k}-1} \cdot m+\beta $$
So $f$ is a linear function, say $f(m)=A m+\beta$ for all $m \in \mathbb{Z}$ with some constant $A \in \mathbb{Q}$. Plugging this into (1) one obtains $\left(A^{2}-2 A\right) m+(A \beta-2 C)=0$ for all $m$, which is equivalent to the conjunction of 
$$ A^{2}=2 A \quad \text { and } \quad A \beta=2 C $$
The first equation is equivalent to $A \in\{0,2\}$, and as $C \neq 0$ the second one gives 
$$ A=2 \quad \text { and } \quad \beta=C $$
This shows that $f$ is indeed the function mentioned in the answer and as the numbers found in (7) do indeed satisfy the equations (6) this function is indeed as desired. 
Comment 1. One may see that $\alpha=2$. A more pedestrian version of the above solution starts with a direct proof of this fact, that can be obtained by substituting some special values into (1), e.g., as follows. 
Set $D=f(0)$. Plugging $m=0$ into (1) and simplifying, we get 
$$ f(n+D)=f(n)+2 C $$
for all $n \in \mathbb{Z}$. In particular, for $n=0, D, 2 D$ we obtain $f(D)=2 C+D, f(2 D)=f(D)+2 C=4 C+D$, and $f(3 D)=f(2 D)+2 C=6 C+D$. So substituting $m=D$ and $n=r-D$ into (1) and applying (8) with $n=r-D$ afterwards we learn 
$$ f(r+2 C)+2 C+D=(f(r)-2 C)+(6 C+D)+2 C $$
i.e., $f(r+2 C)=f(r)+4 C$. By induction in both directions it follows that 
$$ f(n+2 C t)=f(n)+4 C t $$
holds for all $n, t \in \mathbb{Z}$. Claim. If $a$ and $b$ denote two integers with the property that $f(n+a)=f(n)+b$ holds for all $n \in \mathbb{Z}$, then $b=2 a$. Proof. Applying induction in both directions to the assumption we get $f(n+t a)=f(n)+t b$ for all $n, t \in \mathbb{Z}$. Plugging $(n, t)=(0,2 C)$ into this equation and $(n, t)=(0, a)$ into $(9)$ we get $f(2 a C)-f(0)=$ $2 b C=4 a C$, and, as $C \neq 0$, the claim follows. 
Now by (1), for any $m \in \mathbb{Z}$, the numbers $a=f(m)$ and $b=f(3 m)-f(m)+2 C$ have the property mentioned in the claim, whence we have 
$$ f(3 m)-C=3(f(m)-C) . $$
In view of (3) this tells us indeed that $\alpha=2$. Now the solution may be completed as above, but due to our knowledge of $\alpha=2$ we get the desired formula $f(m)=2 m+C$ directly without having the need to go through all linear functions. Now it just remains to check that this function does indeed satisfy (1). 
Comment 2. It is natural to wonder what happens if one replaces the number 2014 appearing in the statement of the problem by some arbitrary integer $B$. 
If $B$ is odd, there is no such function, as can be seen by using the same ideas as in the above solution. 
If $B \neq 0$ is even, however, then the only such function is given by $n \longmapsto 2 n+B / 2$. In case $3 \nmid B$ this was essentially proved above, but for the general case one more idea seems to be necessary. Writing $B=3^{\nu} \cdot k$ with some integers $\nu$ and $k$ such that $3 \nmid k$ one can obtain $f(n)=2 n+B / 2$ for all $n$ that are divisible by $3^{\nu}$ in the same manner as usual; then one may use the formula $f(3 n)=3 f(n)-B$ to establish the remaining cases. 
Finally, in case $B=0$ there are more solutions than just the function $n \longmapsto 2 n$. It can be shown that all these other functions are periodic; to mention just one kind of example, for any even integers $r$ and $s$ the function 
$$ f(n)= \begin{cases}r & \text { if } n \text { is even, } \\ s & \text { if } n \text { is odd }\end{cases} $$
also has the property under discussion.