Periodicity of a sequence modulo

Consider the following sequence:

\begin{cases} u_0 = 0 \\ u_1 = 1 \\ \forall n \geq 2, \, u_n = 3u_{n-1} + u_{n-2} \end{cases}

  1. Show that for all n \in \mathbb{N}^* , u_{n-1}u_{n+1} – u_n^2 = (-1)^n
  2. Let d \geq 2 . Show that (u_n [d])_{n \in \mathbb{N}} is periodic.
  3. Let T be the smallest period. Show that T \leq d^2 – 1
  4. If d > 2 show that T is even.

Solution