Answer:
61,940
Explanation:
For a recursive sequence of reasonable length, it is convenient to use a suitable calculator for figuring the terms of it. Since each term not only depends on previous terms, but also depends on the term number, it works well to use a spreadsheet for doing the calculations. The formula is easily entered and replicated for as many terms as may be required.
__
The result of executing the given algorithm is shown in the attachment. (We have assumed that g_1 means g[-1], and that g_2 means g[-2]. These are the starting values required to compute g[0] when k=0.
That calculation looks like ...
g[0] = (0 -1)×g[-1] +g[-2} = (-1)(9) +5 = -4
The attachment shows the last term (for k=8) is 61,940.