Find all functions $f:\mathbb{N} \to \mathbb{N}$ such that $$f(n) + f\big(f(n)\big) = 6n$$ for every $n\in\mathbb{N}$.
I don't know any formal way to solve this. I just tried to use some functions of the form $f(n) =\alpha n$ and found that $f(n) = 2n$ is the answer because $2n + 2(2n) = 6n$
I don't know how to correctly solve this type of questions and just used simple try-error method, So any help on solving this in mathematical way is appreciated.
I am not also sure about the tags I selected. It looks like a number theory problem to me that is also related to recurrence relations. Sorry if the tag is inappropriate.
Prove that $$f^{k}(n)+f^{k-1}(n)-6\,f^{k-2}(n)=0$$ for every $n\in\mathbb{N}$ and $k\in\mathbb{Z}_{\geq 2}$. Here, $f^0:=\text{id}_\mathbb{N}$ and $f^k:=f\circ f^{k-1}$ for $k\in\mathbb{Z}_{\geq 1}$. Use a result from recursive sequences to show that $$f^k(n)=2^k\,A(n)+(-3)^k\,B(n)$$ for some functions $A,B:\mathbb{N}\to\mathbb{R}$. Verify that $B$ is identically zero.