Problem

Source:

Tags: Linear Recurrences



Let the sequence $\{K_{n}\}_{n \ge 1}$ be defined by \[K_{1}=2, K_{2}=8, K_{n+2}=3K_{n+1}-K_{n}+5(-1)^{n}.\] Prove that if $K_{n}$ is prime, then $n$ must be a power of $3$.