Recurrences, let's start with easier

a n = 7 a n 1 6 a n 2 \large \mathrm{ a_n= 7a_{n-1}- 6 a_{n-2}}

A recurrence relation satisfy the equation above with a 0 = 0 , a 1 = 1 a_0 = 0, a_1=1 .

Find the last 3 digits of a 20 a_{20} .

If you don't know how to get the general solutions for recurrence relations, you may try to learn it here .
This note will prove helpful in the coming problems of this series.


The answer is 595.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Dinesh Chavan
Jul 2, 2014

The given recurrence is a n = 7 a n 1 6 a n 2 a_n=7a_{n-1}-6a_{n-2} . So, we first determine its characteristic polynomial in order to solve the linear recurrence. Therefore, the equation becomes

x 2 = 7 x 6 x^2=7x-6 , i.e.

x 2 7 x + 6 = 0 x^2-7x+6=0 . Now, the roots of this polynomial are x = 6 / 1 x=6/1

. So, according to the notation given in the reference link, we get a n = c 1 ( 6 ) n + c 2 ( 1 ) n a_n=c_1(6)^n+c_2(1)^n .. Now, we find value of c 1 c_1 and c 2 c_2 by substituting n = 0 , 1 n=0,1 . So we get the relations that

c 1 + c 2 = 0 c_1+c_2=0 and 6 c 1 + c 2 = 1 6c_1+c_2=1 . Solving these equations, we get

c 1 = 1 5 , c 2 = 1 5 c_1=\frac{1}{5},c_2=\frac{-1}{5} Therefore, the general term is given by

a n = 1 5 ( 6 n 1 ) a_n=\frac{1}{5}(6^n-1)

So, now we have to find a 20 a_{20} , that is

a 20 = 1 5 ( 6 20 1 ) a_{20}=\frac{1}{5}(6^{20}-1) .

Therefore, our task remains just to find the last 3 digits of
( 6 20 1 ) 1 5 (6^{20}-1)\frac{1}{5} , which is easy using congruence.

super solution .

Tejas Suresh - 6 years ago

when will you post your next problem?.....

akhilesh agrawal - 6 years, 11 months ago

Very good, exactly the way I had taught you :P Buckle up, next will be better recurrences , harder to find !

Aditya Raut - 6 years, 11 months ago

Log in to reply

HAHA,, applying my tricks on me is not a good idea. By the way, m not very good at recurrence, but will try for it

Dinesh Chavan - 6 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...