Maths Olympiad Prep

Library / /3 of 3

, 2012

Algebra Difficulty 7.3 National olympiad, round 2 Prove it Spain

A sequence (an)n1(a_n)_{n \ge 1} is defined recursively as
a1=1, a2=5, and an=an12+4an2, for n3. a_1 = 1, \ a_2 = 5, \text{ and } a_n = \frac{a_{n-1}^2 + 4}{a_{n-2}}, \text{ for } n \ge 3.
Prove that every term in the sequence is an integer. Find an explicit formula for ana_n.

Solution

Let us compute the first few terms:

a1=1a_1 = 1

a2=5a_2 = 5

a3=52+41=25+41=29a_3 = \frac{5^2 + 4}{1} = \frac{25 + 4}{1} = 29

a4=292+45=841+45=8455=169a_4 = \frac{29^2 + 4}{5} = \frac{841 + 4}{5} = \frac{845}{5} = 169

a5=1692+429=28561+429=2856529=985a_5 = \frac{169^2 + 4}{29} = \frac{28561 + 4}{29} = \frac{28565}{29} = 985

a6=9852+4169=970225+4169=970229169=5743a_6 = \frac{985^2 + 4}{169} = \frac{970225 + 4}{169} = \frac{970229}{169} = 5743

a7=57432+4985=32984149+4985=32984153985=33553a_7 = \frac{5743^2 + 4}{985} = \frac{32984149 + 4}{985} = \frac{32984153}{985} = 33553

We see that all terms are integers.

Let us try to find an explicit formula. Notice that the sequence seems to be related to powers of 55 and 11.

Let us try to guess a closed formula. Let us look for a pattern. Compute the ratios:

a2/a1=5/1=5a_2/a_1 = 5/1 = 5
a3/a2=29/5=5.8a_3/a_2 = 29/5 = 5.8
a4/a3=169/295.827...a_4/a_3 = 169/29 \approx 5.827...
a5/a4=985/1695.828...a_5/a_4 = 985/169 \approx 5.828...
a6/a5=5743/9855.828...a_6/a_5 = 5743/985 \approx 5.828...
a7/a6=33553/57435.843...a_7/a_6 = 33553/5743 \approx 5.843...

This suggests that the sequence grows exponentially.

Let us try to solve the recurrence:

an=an12+4an2a_n = \frac{a_{n-1}^2 + 4}{a_{n-2}}

Multiply both sides by an2a_{n-2}:

anan2=an12+4a_n a_{n-2} = a_{n-1}^2 + 4

This is a second-order recurrence. Let us try to find a closed formula.

Let us try to write ana_n in terms of an1a_{n-1} and an2a_{n-2}:

anan2an12=4a_n a_{n-2} - a_{n-1}^2 = 4

Or:

anan2an12=4a_n a_{n-2} - a_{n-1}^2 = 4

This is similar to the recurrence for Chebyshev polynomials of the first kind, Tn(x)T_n(x), which satisfy:

Tn(x)=2xTn1(x)Tn2(x)T_n(x) = 2x T_{n-1}(x) - T_{n-2}(x)

But our recurrence is different. Let us try to find a pattern.

Let us try to write ana_n as kan1an2k a_{n-1} - a_{n-2} for some kk.

Alternatively, let us try to solve the recurrence by induction.

Let us try to prove by induction that all ana_n are integers.

Base cases: a1=1a_1 = 1, a2=5a_2 = 5 are integers.

Inductive step: Assume an1a_{n-1} and an2a_{n-2} are integers. Then an=an12+4an2a_n = \frac{a_{n-1}^2 + 4}{a_{n-2}}. We need to show that an2a_{n-2} divides an12+4a_{n-1}^2 + 4.

But from the recurrence:

an1an3=an22+4a_{n-1} a_{n-3} = a_{n-2}^2 + 4

So an22+4=an1an3a_{n-2}^2 + 4 = a_{n-1} a_{n-3}

Therefore,

an12+4=anan2a_{n-1}^2 + 4 = a_n a_{n-2}

So an2a_{n-2} divides an12+4a_{n-1}^2 + 4 because ana_n is defined as an12+4an2\frac{a_{n-1}^2 + 4}{a_{n-2}}.

Therefore, by induction, all ana_n are integers.

Now, let us try to find an explicit formula.

Let us try to solve the recurrence:

anan2an12=4a_n a_{n-2} - a_{n-1}^2 = 4

Let us try to find a solution of the form an=rn+srna_n = r^n + s r^{-n} for some rr.

Suppose an=αλn+βμna_n = \alpha \lambda^n + \beta \mu^n.

Let us try to find λ\lambda and μ\mu such that the recurrence is satisfied.

Let us try an=kan1an2a_n = k a_{n-1} - a_{n-2}.

Alternatively, let us try to find a pattern in the numbers:

1,5,29,169,985,5743,33553,...1, 5, 29, 169, 985, 5743, 33553, ...

These are the sequence A001834 in OEIS, which is related to the solutions of Pell's equation x25y2=4x^2 - 5y^2 = -4.

In fact, the sequence satisfies an25an12=4(1)na_n^2 - 5 a_{n-1}^2 = 4 (-1)^n.

Let us check:

a225a12=2551=20a_2^2 - 5 a_1^2 = 25 - 5 \cdot 1 = 20
a325a22=841525=841125=716a_3^2 - 5 a_2^2 = 841 - 5 \cdot 25 = 841 - 125 = 716
a425a32=285615841=285614205=24356a_4^2 - 5 a_3^2 = 28561 - 5 \cdot 841 = 28561 - 4205 = 24356

But this does not match 4(1)n4 (-1)^n.

Alternatively, let us try to find a closed formula.

Let us try to fit an=(α+β5)n+(αβ5)n2a_n = \frac{(\alpha + \beta \sqrt{5})^n + (\alpha - \beta \sqrt{5})^n}{2} for some α,β\alpha, \beta.

Let us try an=(1+25)n+(125)n2a_n = \frac{(1 + 2 \sqrt{5})^n + (1 - 2 \sqrt{5})^n}{2}.

Let us check for n=1n = 1:

a1=(1+25)+(125)2=22=1a_1 = \frac{(1 + 2 \sqrt{5}) + (1 - 2 \sqrt{5})}{2} = \frac{2}{2} = 1

For n=2n = 2:

(1+25)2=1+45+45=1+45+20=21+45(1 + 2 \sqrt{5})^2 = 1 + 4 \sqrt{5} + 4 \cdot 5 = 1 + 4 \sqrt{5} + 20 = 21 + 4 \sqrt{5}
(125)2=145+20=2145(1 - 2 \sqrt{5})^2 = 1 - 4 \sqrt{5} + 20 = 21 - 4 \sqrt{5}
Sum: 21+45+2145=4221 + 4 \sqrt{5} + 21 - 4 \sqrt{5} = 42
a2=422=21a_2 = \frac{42}{2} = 21

But a2=5a_2 = 5 in our sequence.

So this does not match.

Alternatively, let us try to find a recurrence of the form an=kan1an2a_n = k a_{n-1} - a_{n-2}.

Let us try to fit an=6an1an2a_n = 6 a_{n-1} - a_{n-2}.

a3=651=29a_3 = 6 \cdot 5 - 1 = 29
a4=6295=169a_4 = 6 \cdot 29 - 5 = 169
a5=616929=985a_5 = 6 \cdot 169 - 29 = 985
a6=6985169=5743a_6 = 6 \cdot 985 - 169 = 5743
a7=65743985=33553a_7 = 6 \cdot 5743 - 985 = 33553

This matches the sequence!

Therefore, the sequence satisfies the linear recurrence:

an=6an1an2a_n = 6 a_{n-1} - a_{n-2}, with a1=1a_1 = 1, a2=5a_2 = 5

The explicit formula for such a recurrence is:

Let the characteristic equation be x26x+1=0x^2 - 6x + 1 = 0

The roots are x=3±22x = 3 \pm 2 \sqrt{2}

So the general solution is:

an=α(3+22)n1+β(322)n1a_n = \alpha (3 + 2 \sqrt{2})^{n-1} + \beta (3 - 2 \sqrt{2})^{n-1}

Let us solve for α\alpha and β\beta using a1=1a_1 = 1, a2=5a_2 = 5:

For n=1n = 1:
a1=α(3+22)0+β(322)0=α+β=1a_1 = \alpha (3 + 2 \sqrt{2})^0 + \beta (3 - 2 \sqrt{2})^0 = \alpha + \beta = 1

For n=2n = 2:
a2=α(3+22)1+β(322)1=α(3+22)+β(322)=5a_2 = \alpha (3 + 2 \sqrt{2})^1 + \beta (3 - 2 \sqrt{2})^1 = \alpha (3 + 2 \sqrt{2}) + \beta (3 - 2 \sqrt{2}) = 5

So:
α+β=1\alpha + \beta = 1
α(3+22)+β(322)=5\alpha (3 + 2 \sqrt{2}) + \beta (3 - 2 \sqrt{2}) = 5

Let us solve for α\alpha and β\beta:

Let S=3+22S = 3 + 2 \sqrt{2}, T=322T = 3 - 2 \sqrt{2}

αS+βT=5\alpha S + \beta T = 5
α+β=1\alpha + \beta = 1

So β=1α\beta = 1 - \alpha

αS+(1α)T=5\alpha S + (1 - \alpha) T = 5
αS+TαT=5\alpha S + T - \alpha T = 5
α(ST)+T=5\alpha (S - T) + T = 5

ST=(3+22)(322)=42S - T = (3 + 2 \sqrt{2}) - (3 - 2 \sqrt{2}) = 4 \sqrt{2}

So:
α(42)+T=5\alpha (4 \sqrt{2}) + T = 5
α=5T42\alpha = \frac{5 - T}{4 \sqrt{2}}

T=322T = 3 - 2 \sqrt{2}

5T=53+22=2+225 - T = 5 - 3 + 2 \sqrt{2} = 2 + 2 \sqrt{2}

So:
α=2+2242=2(1+2)42=1+222\alpha = \frac{2 + 2 \sqrt{2}}{4 \sqrt{2}} = \frac{2(1 + \sqrt{2})}{4 \sqrt{2}} = \frac{1 + \sqrt{2}}{2 \sqrt{2}}

β=1α=11+222\beta = 1 - \alpha = 1 - \frac{1 + \sqrt{2}}{2 \sqrt{2}}

Therefore, the explicit formula is:

an=1+222(3+22)n1+(11+222)(322)n1 a_n = \frac{1 + \sqrt{2}}{2 \sqrt{2}} (3 + 2 \sqrt{2})^{n-1} + \left(1 - \frac{1 + \sqrt{2}}{2 \sqrt{2}}\right) (3 - 2 \sqrt{2})^{n-1}

Alternatively, since all terms are integers, the closed formula is:

an=6an1an2,a1=1, a2=5 a_n = 6 a_{n-1} - a_{n-2}, \quad a_1 = 1, \ a_2 = 5

Therefore, every term in the sequence is an integer, and the explicit formula is as above.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.