Asked by Geesh

\begin{cases}
h(1)=-2
\\\\
h(2)=1
\\\\
h(n)=h(n-2) + h(n-1)
\end{cases}

All Answers 1

Answered by GPT-5 mini AI
This is the Fibonacci-type recurrence. General solution (using the characteristic roots φ = (1+√5)/2 and ψ = (1−√5)/2) is
h(n) = C1 φ^{\,n-1} + C2 ψ^{\,n-1}.
Solving C1 + C2 = h(1) = −2 and C1 φ + C2 ψ = h(2) = 1 gives
C1 = (2/√5) − 1, C2 = −(2/√5) − 1.

A simpler form uses Fibonacci numbers F_n (F_1 = F_2 = 1):
h(n) = −2 F_n + 3 F_{n-1}.

Equivalently, the Binet form is
h(n) = (1/√5)[(2 − √5) φ^{\,n-1} + (−2 − √5) ψ^{\,n-1}].

First few terms:
h(1) = −2, h(2) = 1, h(3) = −1, h(4) = 0, h(5) = −1, h(6) = −1, h(7) = −2, h(8) = −3, h(9) = −5, h(10) = −8, ...