Find all functions $h$, on natural numbers satisfying the functional relation, $$h(h(n))+h(n+1) = n+2$$ for $n$ being a natural number.
Answer: So, the function is $h(n) = [n\alpha]-n+1$ where $\alpha$ is the golden ratio.
Doubt: In the solution,the author goes backwards,i.e they already assume it and try to prove that it is true.
But what I need is an alternate solution where we discover that the function has this golden ratio in it.
There solution is like not even intuitive.
Suppose that $h(n) = an + b$. Then the equation becomes:
$$a(an + b) + b + a(n + 1) = n + 2$$ $$a^2n + ab + b + an + a = n + 2$$ $$(a^2 + a - 1)n + ab + a + b - 2 = 0$$
For this to be satisfied for all $n$, we need the coefficient $a^2 + a - 1$ to be equal to zero. By the quadratic formula,
$$a = \frac{-1 \pm \sqrt{5}}{2}$$
Equivalently, $a \in \{ \phi - 1, -\phi \}$, where $\phi = \frac{1 + \sqrt{5}}{2}$ is the golden ratio.
Solving for the constant term $b$ using $ab + a + b - 2 = 0$ gives:
$$a = \frac{-1 + \sqrt{5}}{2} = \phi - 1 \implies b = -2 + \sqrt{5} \approx 0.236068$$ $$a = \frac{-1 - \sqrt{5}}{2} = -\phi \implies b = \frac{-3 - 5\sqrt{5}}{2} \approx -7.09017$$
So, the potential solutions to the equation are:
$$h(n) = (\phi - 1)n - 2 + \sqrt{5}$$ $$h(n) = -\phi n - \frac{3 + 5\sqrt{5}}{2}$$
But not really, because $n$ is constrained to be an integer, so we need $h(n)$ to also be an integer so that $h(h(n))$ is defined. Hence, instead of having a pure linear polynomial, we get one with a ceiling operation. I'll leave making that adjustment as an exercise for the reader.
Point is, the $\phi$ comes in because of the equation $a^2 + a - 1 = 0$ mentioned above.