Maths WorkshopMaths problems with full solutions
Exercise 1228Algebra › Equations and radicalsOlympiadAdded 4 Nov 2026

A recurrence with a hidden invariant

#linear recurrence#invariant#characteristic equation

Statement

Define a0=0a_0=0, a1=1a_1=1 and an+2=4an+1−ana_{n+2}=4a_{n+1}-a_n. The first terms are 0,1,4,15,56,209,…0,1,4,15,56,209,\dots

  1. Show that anan+2−an+12=−1a_na_{n+2}-a_{n+1}^2=-1 for all n≥0n\ge0.
  2. Find a closed formula for ana_n.
Hint

For part 1, show that the quantity Dn=anan+2−an+12D_n=a_na_{n+2}-a_{n+1}^2 does not depend on nn. For part 2, solve r2=4r−1r^2=4r-1.

Show solutionHide solution

Solution

1. An invariant. Using an+3=4an+2−an+1a_{n+3}=4a_{n+2}-a_{n+1} and then 4an+1−an+2=an4a_{n+1}-a_{n+2}=a_n,
Dn+1=an+1an+3−an+22=an+1(4an+2−an+1)−an+22=an+2(4an+1−an+2)−an+12=an+2an−an+12=Dn.D_{n+1}=a_{n+1}a_{n+3}-a_{n+2}^2=a_{n+1}\bigl(4a_{n+2}-a_{n+1}\bigr)-a_{n+2}^2=a_{n+2}\bigl(4a_{n+1}-a_{n+2}\bigr)-a_{n+1}^2=a_{n+2}a_n-a_{n+1}^2=D_n.
So Dn=D0=a0a2−a12=0⋅4−1=−1D_n=D_0=a_0a_2-a_1^2=0\cdot4-1=-1.

2. Closed form. The roots of r2−4r+1=0r^2-4r+1=0 are r±=2±3r_\pm=2\pm\sqrt3. A general solution is an=Ar+n+Br−na_n=Ar_+^n+Br_-^n. From a0=0a_0=0 we get B=−AB=-A, and a1=1a_1=1 gives A(r+−r−)=23A=1A(r_+-r_-)=2\sqrt3A=1. So
an=(2+3)n−(2−3)n23.a_n=\frac{(2+\sqrt3)^n-(2-\sqrt3)^n}{2\sqrt3}.

Checks. n=2n=2: a2=4a_2=4 ✓. Also r+r−=1r_+r_-=1 makes part 1 transparent: anan+2−an+12=−(r+r−)n(r+−r−)212=−1a_na_{n+2}-a_{n+1}^2=-\frac{(r_+r_-)^n(r_+-r_-)^2}{12}=-1.

Remark. The numbers ana_n are the yy-values of solutions of the Pell-type equation x2−3y2=1x^2-3y^2=1.

Lesson. For a linear recurrence, look for a conserved quantity (a determinant-like expression) by checking that it does not change when n→n+1n\to n+1.