Proof verification of an exercise involving a functional equation Let $f: \mathbb{N} \rightarrow \mathbb{R}$ be a function and $a \in \mathbb{R}$ such that 
$$f(m+n) = f(m) + f(n) + a$$
$$f(2) = 10, f(20) = 118$$ 
Find $a$ and $f$.
I found this exercise at the beginning of a Real Analysis textbook. I've never solved a functional equation before, but here's my solution (attempt):
i) Using induction it's easy to verify that  for $m, n \in \mathbb{N}$ we have $f(m \cdot n) = m (f(n) + a)$, since 
$$f((m+1)n) = f(mn + n) = f(mn) + f(n) + a$$
ii) Then $118 = f(20) = f(10 \cdot 2) = 10 (f(2) + a) = 10 (10 + a) \Rightarrow a = \frac{9}{5}$
iii) Then $f(0) = f(0 + 0) = f(0) + f(0) + a \Rightarrow f(0) = -a = -\frac{9}{5}$. 
We also get $10 = f(2) = f(1+1) = f(1) + f(1) + \frac{9}{5} = 2 f(1) + \frac{9}{5} \Rightarrow f(1) = \frac{41}{10}$ 
iv) Then finally we can define $f$ recursively by $f(0) = -\frac{9}{5}$ and $$f(n+1) = f(n) + f(1) + \frac{9}{5} = f(n) + \frac{41}{10} + \frac{9}{5} = f(n) + \frac{59}{10}$$
EDIT
Then thanks to the user lulu, the real pattern should be $f(m \cdot n) = m f(n) + (m-1) a$ instead. Using this in ii) then gives $a = 2$. Then we get in iii) that $f(0) = -2$ and $f(1) = 4$, so $f$ is defined by $f(n+1) = f(n) + 6$. And now it's pretty obivous that $f(n) = 6n - 2$ solves the equation.
 A: $f(m+n)+a=f(m)+f(n)+2a$, Let$g(x)=f(x)+a\rightarrow g(m+n)=g(m)+g(n)$.
So $g$ satisfies Cauchy's functional equation and its solution is $g(n)=kn\rightarrow f(n)=kn-a$
$f(2)=10,f(20)=118 \rightarrow k=6,a=2,f(n)=6n-2$.
It can be sloved as same method if $f:\mathbb R\rightarrow \mathbb R$ and $f$ is  lebesgue measurable.
Details about Cauchy's functional equation could refer to https://en.wikipedia.org/wiki/Cauchy%27s_functional_equation
A: HINT:
We have $$f(20)=2f(10)+a=10f(2)+9a\implies a=2$$
Now consider $$f(m-n)=f(m)+f(-n)+2\\f(m+n)=f(m)+f(n)+2$$ and adding gives $$f(m-n)+f(m+n)=2f(m)+f(-n)+f(n)+4$$ or $$f(2m)-2=2f(m)+f(0)-2+4$$ Now what do we know about $f(0)$?
A: We have
$$f(m+n) = f(m) + f(n) + a$$
Hence
$$f(2n)=2f(n)+a$$
Thus
$$f(0)=2f(0)+a$$
Then
$$f(0)=-a$$
Now
\begin{align}
f(20)
&= 2f(10) + a \\
&= 2(f(8)+f(2)+a) +a \\
&= 2(2f(4)+a) +2f(2) +3a \\
&= 4(2f(2)+a) +2f(2) +5a \\
&= 10f(2) + 9a \\
118 &= 100 + 9a \\
a & =2
\end{align}
So
$$f(0)=-2, \ f(1)=\frac{10-a}{2}=4$$
And
$$f(2n)=2f(n)+2=2(f(n)+1)$$
