<s>[INST] Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ which satisfy $ f\left(m^{2}+m n\right)=f(m)^{2}+f(m) f(n) $ Question -
Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ which satisfy the equation
$$
f\left(m^{2}+m n\right)=f(m)^{2}+f(m) f(n)
$$
for all natural numbers $m, n$
by putting $m=1$ and $f(1)=k$ we get 
$f(n+1)=k^2 + kf(n)$
then hint says use $3^2 + 3.1 = 2^2 +2.4$ to get polynomial relation for k..
i am not getting how to use this hint ...i think i am missing some very easy tricks to get at this which i have not lernt yet ...
any help will be appreciated
thankyou
 [/INST] Now this is my full solution if $0 \notin \mathbb{N}$
$$f(m^2+mn)=f(m)^2+f(m)f(n) \implies P(m,n)$$
Let $f(1)=k$
$$P(1,m) \implies f(m+1)=kf(m)+k^2$$
$$P(1,1) \implies f(2)=kf(1)+k^2=2k^2$$
$$P(1,2) \implies f(3)=kf(2)+k^2=k(2k^2)+k^2=2k^3+k^2$$
$$P(1,3) \implies f(4)=kf(3)+k^2=k(2k^3+k^2)+k^2=2k^4+k^3+k^2$$
and so on, by induction,
$$f(n)=2k^n+k^{n-1}+k^{n-2}+\dots+k^2 \tag{1}$$
for $n \geq3$.
Now $n=6$ in $(1)$ gives
$$f(6)=2k^6+k^5+k^4+k^3+k^2$$
while
$$P(2,1) \implies f(6)=f(2)^2+kf(2)=(2k^2)^2+k(2k^2)=4k^4+2k^3$$
So,
$$2k^6+k^5+k^4+k^3+k^2=4k^4+2k^3 $$
$$\Leftrightarrow 2k^6+k^5-3k^4-k^3+k^2=0$$
and since $k \neq 0$ we can divide by $k^2$:
$$2k^4+k^3-3k^2-k+1=0$$
We can easily find by the rational roots theorem that $k=1$ is the only possible root, and checking back, it works.
Thus, by $(1)$,
$$f(n)=2(1^{n})+\underbrace{1^{n-1}+\dots+1^{2}}_\text{$(n-2)$ terms}=2+n-2=n $$
for all $n \geq 3$. Since $f(1)=k=1$ and $f(2)=2k^2=2$, we can extend the definition:
$$f(n)=n$$
for all $n \in \mathbb{Z^+}$ $\Box$.


I'll make the induction proof of $(1)$ here. Our base case $n=3$ works, now 
$$f(n)=2k^n+k^{n-1}+k^{n-2}+\dots+k^2$$
and 
$$P(1,m) \implies f(m+1)=kf(m)+k^2$$
So
$$f(n+1)=kf(n)+k^2=k(2k^n+k^{n-1}+k^{n-2}+\dots+k^2)+k^2$$
$$=2k^{n+1}+k^{n}+k^{n-1}+\dots+k^3+k^2$$
So, indeed statement $(1)$ is true for all $n \geq 3$.
</s>