Question 120
Let $k \gt 1$ be an integer. The sequence $\{a_i\}_{i=1}^\infty$ is defined as $a_1 = 1$, $a_2 = k$, and for all $n \gt 1$ we have
$$
a_{n+1} - (k+1)a_n + a_{n-1} = 0.
$$
Find all positive integers $n$ such that $a_n$ is a power of $k$.
$$
a_{n+1} - (k+1)a_n + a_{n-1} = 0.
$$
Find all positive integers $n$ such that $a_n$ is a power of $k$.