linear homogeneous recurrence relations - dr....
TRANSCRIPT
Linear Homogeneous Recurrence Relations
The Fabled Beginnings
King Shirham of India
Grand Vizier Sissa Ben Dahir
The invention of chess
The prize: grains of wheat?
DefinitionA recurrence relation is an equation that recursively defines asequence, once one or more initial terms are given: each further termof the sequence is defined as a function of the preceding terms.
The Fabled Beginnings
King Shirham of India
Grand Vizier Sissa Ben Dahir
The invention of chess
The prize: grains of wheat?
DefinitionA recurrence relation is an equation that recursively defines asequence, once one or more initial terms are given: each further termof the sequence is defined as a function of the preceding terms.
Solving the Problem
let sk be the sum of the grains on the first k squares
let tk be the number of grains on the kth square
So, we know that tk+1 = 2tk. What we want is a general expression.
Solving the Problem
let sk be the sum of the grains on the first k squares
let tk be the number of grains on the kth square
So, we know that tk+1 = 2tk. What we want is a general expression.
Let’s Take a Look At What’s Going On
t1 = 1
t2 = 2t1t3 = 2t2 = 22t1
t4 = 2t3 = 22t2 = 23t1
and in general,tk = 2tk−1 = . . . = 2k−1t1
Using the initial condition, we have
tk = 2k−1
Let’s Take a Look At What’s Going On
t1 = 1
t2 = 2t1
t3 = 2t2 = 22t1t4 = 2t3 = 22t2 = 23t1
and in general,tk = 2tk−1 = . . . = 2k−1t1
Using the initial condition, we have
tk = 2k−1
Let’s Take a Look At What’s Going On
t1 = 1
t2 = 2t1t3 = 2t2 = 22t1
t4 = 2t3 = 22t2 = 23t1
and in general,tk = 2tk−1 = . . . = 2k−1t1
Using the initial condition, we have
tk = 2k−1
Let’s Take a Look At What’s Going On
t1 = 1
t2 = 2t1t3 = 2t2 = 22t1
t4 = 2t3 = 22t2 = 23t1
and in general,tk = 2tk−1 = . . . = 2k−1t1
Using the initial condition, we have
tk = 2k−1
Let’s Take a Look At What’s Going On
t1 = 1
t2 = 2t1t3 = 2t2 = 22t1
t4 = 2t3 = 22t2 = 23t1
and in general,tk = 2tk−1 = . . . = 2k−1t1
Using the initial condition, we have
tk = 2k−1
Let’s Take a Look At What’s Going On
t1 = 1
t2 = 2t1t3 = 2t2 = 22t1
t4 = 2t3 = 22t2 = 23t1
and in general,tk = 2tk−1 = . . . = 2k−1t1
Using the initial condition, we have
tk = 2k−1
So What About the Sum?
What we really want is sk, the sum of the number of grains on ksquares.
sk+1 = sk + tk+1
which is another form of a recurrence relation.
sk+1 = sk + 2k
So What About the Sum?
What we really want is sk, the sum of the number of grains on ksquares.
sk+1 = sk + tk+1
which is another form of a recurrence relation.
sk+1 = sk + 2k
So What About the Sum?
What we really want is sk, the sum of the number of grains on ksquares.
sk+1 = sk + tk+1
which is another form of a recurrence relation.
sk+1 = sk + 2k
Again With Iteration
s2 = s1 + 2
s3 = s2 + 22 = s1 + 2 + 22
...
sk = sk−1 + 2k−1 = . . . = s1 + 2 + 22 + . . .+ 2k−1
Using initial condition that s1 = 1, we have
sk = 1 + 2 + 22 + . . .+ 2k−1
Again With Iteration
s2 = s1 + 2
s3 = s2 + 22 = s1 + 2 + 22
...
sk = sk−1 + 2k−1 = . . . = s1 + 2 + 22 + . . .+ 2k−1
Using initial condition that s1 = 1, we have
sk = 1 + 2 + 22 + . . .+ 2k−1
Again With Iteration
s2 = s1 + 2
s3 = s2 + 22 = s1 + 2 + 22
...
sk = sk−1 + 2k−1 = . . . = s1 + 2 + 22 + . . .+ 2k−1
Using initial condition that s1 = 1, we have
sk = 1 + 2 + 22 + . . .+ 2k−1
Recall Series ...
What type of series is this?
It is a finite geometric series.
Formula for the partial sum of a geometric series?
n∑k=0
xk =1− xn+1
1− x
So, we have
sk =1− 2k
1− 2= 2k − 1
Recall Series ...
What type of series is this?
It is a finite geometric series.
Formula for the partial sum of a geometric series?
n∑k=0
xk =1− xn+1
1− x
So, we have
sk =1− 2k
1− 2= 2k − 1
Recall Series ...
What type of series is this?
It is a finite geometric series.
Formula for the partial sum of a geometric series?
n∑k=0
xk =1− xn+1
1− x
So, we have
sk =1− 2k
1− 2= 2k − 1
Bad Decision King ...
For a chess board, this would give
264 − 1 = 18, 446, 744, 073, 709, 551, 615
grains. So, the King made a bad mistake ...
Observations
We want an, the minimum number of moves
To move n rings, we have to play game with n− 1 rings
To move n− 1 rings, we have to play game with n− 2 rings
So this is a recursive relation.
an = an−1 + 1 + an−1 = 2an−1 + 1
with an initial condition of a1 = 1.
Closed form: an = 2n − 1
Observations
We want an, the minimum number of moves
To move n rings, we have to play game with n− 1 rings
To move n− 1 rings, we have to play game with n− 2 rings
So this is a recursive relation.
an = an−1 + 1 + an−1 = 2an−1 + 1
with an initial condition of a1 = 1.
Closed form: an = 2n − 1
Observations
We want an, the minimum number of moves
To move n rings, we have to play game with n− 1 rings
To move n− 1 rings, we have to play game with n− 2 rings
So this is a recursive relation.
an = an−1 + 1 + an−1 = 2an−1 + 1
with an initial condition of a1 = 1.
Closed form: an = 2n − 1
Observations
We want an, the minimum number of moves
To move n rings, we have to play game with n− 1 rings
To move n− 1 rings, we have to play game with n− 2 rings
So this is a recursive relation.
an = an−1 + 1 + an−1 = 2an−1 + 1
with an initial condition of a1 = 1.
Closed form: an = 2n − 1
Observations
We want an, the minimum number of moves
To move n rings, we have to play game with n− 1 rings
To move n− 1 rings, we have to play game with n− 2 rings
So this is a recursive relation.
an = an−1 + 1 + an−1 = 2an−1 + 1
with an initial condition of a1 = 1.
Closed form: an = 2n − 1
Linear Homogeneous Recurrence Relations
Another method for solving these relations: using characteristic roots
an = c1an−1 + c2an−2 + . . .+ cpan−p
n ≥ p
all the ci’s are constants with cp 6= 0
called linear because all of the ap terms are to the first power
called homogeneous because all terms on the right hand sideinvolve some ap
Linear Homogeneous Recurrence Relations
Another method for solving these relations: using characteristic roots
an = c1an−1 + c2an−2 + . . .+ cpan−p
n ≥ p
all the ci’s are constants with cp 6= 0
called linear because all of the ap terms are to the first power
called homogeneous because all terms on the right hand sideinvolve some ap
Linear Homogeneous Recurrence Relations
Another method for solving these relations: using characteristic roots
an = c1an−1 + c2an−2 + . . .+ cpan−p
n ≥ p
all the ci’s are constants with cp 6= 0
called linear because all of the ap terms are to the first power
called homogeneous because all terms on the right hand sideinvolve some ap
Linear Homogeneous Recurrence Relations
Another method for solving these relations: using characteristic roots
an = c1an−1 + c2an−2 + . . .+ cpan−p
n ≥ p
all the ci’s are constants with cp 6= 0
called linear because all of the ap terms are to the first power
called homogeneous because all terms on the right hand sideinvolve some ap
Characteristic Equations and Characteristic Roots
TheoremSuppose that a linear homogeneous recurrence relation with constantcoefficients has characteristic roots α1, α2, . . . , αp. Then ifλ1, λ2, . . . , λp are constants then every expression of the form
an = λ1αn1 + λ2α
n2 + . . .+ λpα
np
is a solution to the recurrence relation. Moreover, if the roots aredistinct, every solution has this form for some constantsλ1, λ2, . . . , λp.
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
an = 5an−1 − 6an−2
with a0 = a1 = 1.
First we rewrite as a polynomial
an = 5an−1 − 6an−2 ⇒ xn = 5xn−1 − 6xn−2
Then, divide by xk where k is smallest present power
x2 = 5x− 6⇒ x2 − 5x + 6 = 0
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
an = 5an−1 − 6an−2
with a0 = a1 = 1.
First we rewrite as a polynomial
an = 5an−1 − 6an−2 ⇒ xn = 5xn−1 − 6xn−2
Then, divide by xk where k is smallest present power
x2 = 5x− 6⇒ x2 − 5x + 6 = 0
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
an = 5an−1 − 6an−2
with a0 = a1 = 1.
First we rewrite as a polynomial
an = 5an−1 − 6an−2 ⇒ xn = 5xn−1 − 6xn−2
Then, divide by xk where k is smallest present power
x2 = 5x− 6⇒ x2 − 5x + 6 = 0
Distinct Roots
Now, factor
x2 − 5x + 6 = 0⇒ (x− 2)(x− 3) = 0
characteristic roots: α1 = 2 and α2 = 3
So, two solutions are an = 2n and an = 3n - but not simultaneously.To find when that would happen, we need to solve
an = λ12n + λ23n
using the initial conditions.
Distinct Roots
Now, factor
x2 − 5x + 6 = 0⇒ (x− 2)(x− 3) = 0
characteristic roots: α1 = 2 and α2 = 3
So, two solutions are an = 2n and an = 3n - but not simultaneously.To find when that would happen, we need to solve
an = λ12n + λ23n
using the initial conditions.
Distinct Roots
Now, factor
x2 − 5x + 6 = 0⇒ (x− 2)(x− 3) = 0
characteristic roots: α1 = 2 and α2 = 3
So, two solutions are an = 2n and an = 3n - but not simultaneously.To find when that would happen, we need to solve
an = λ12n + λ23n
using the initial conditions.
Distinct Roots
Using the initial conditions, we see
a0 = 1 : λ120 + λ230 = 1⇒ λ1 + λ2 = 1
a1 = 1 : λ121 + λ231 = 1⇒ 2λ1 + 3λ2 = 1
This becomes {λ1+λ2=1
2λ1+3λ2=1
When we solve, we get λ1 = 2 and λ2 = −1.This gives
an = 2 · 2n − 3n = 2n+1 − 3n
So, every solution has this form.
Distinct Roots
Using the initial conditions, we see
a0 = 1 : λ120 + λ230 = 1⇒ λ1 + λ2 = 1
a1 = 1 : λ121 + λ231 = 1⇒ 2λ1 + 3λ2 = 1
This becomes {λ1+λ2=1
2λ1+3λ2=1
When we solve, we get λ1 = 2 and λ2 = −1.This gives
an = 2 · 2n − 3n = 2n+1 − 3n
So, every solution has this form.
Distinct Roots
Using the initial conditions, we see
a0 = 1 : λ120 + λ230 = 1⇒ λ1 + λ2 = 1
a1 = 1 : λ121 + λ231 = 1⇒ 2λ1 + 3λ2 = 1
This becomes {λ1+λ2=1
2λ1+3λ2=1
When we solve, we get λ1 = 2 and λ2 = −1.This gives
an = 2 · 2n − 3n = 2n+1 − 3n
So, every solution has this form.
Distinct Roots
Using the initial conditions, we see
a0 = 1 : λ120 + λ230 = 1⇒ λ1 + λ2 = 1
a1 = 1 : λ121 + λ231 = 1⇒ 2λ1 + 3λ2 = 1
This becomes {λ1+λ2=1
2λ1+3λ2=1
When we solve, we get λ1 = 2 and λ2 = −1.
This gives
an = 2 · 2n − 3n = 2n+1 − 3n
So, every solution has this form.
Distinct Roots
Using the initial conditions, we see
a0 = 1 : λ120 + λ230 = 1⇒ λ1 + λ2 = 1
a1 = 1 : λ121 + λ231 = 1⇒ 2λ1 + 3λ2 = 1
This becomes {λ1+λ2=1
2λ1+3λ2=1
When we solve, we get λ1 = 2 and λ2 = −1.This gives
an = 2 · 2n − 3n = 2n+1 − 3n
So, every solution has this form.
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
bk = −7bk−1 + 18bk−2
if b0 = 0 and b1 = 8.
Solution
characteristic equation:
xk + 7xk−1 − 18xk−2 = 0
which becomesx2 + 7x− 18 = 0
that has roots
(x + 9)(x− 2) = 0⇒ x = −9, 2
so our solutions are all of the form
bk = λ1(−9)k + λ2(2)k
Solution
characteristic equation:
xk + 7xk−1 − 18xk−2 = 0
which becomesx2 + 7x− 18 = 0
that has roots
(x + 9)(x− 2) = 0⇒ x = −9, 2
so our solutions are all of the form
bk = λ1(−9)k + λ2(2)k
Solution
characteristic equation:
xk + 7xk−1 − 18xk−2 = 0
which becomesx2 + 7x− 18 = 0
that has roots
(x + 9)(x− 2) = 0⇒ x = −9, 2
so our solutions are all of the form
bk = λ1(−9)k + λ2(2)k
Solution
characteristic equation:
xk + 7xk−1 − 18xk−2 = 0
which becomesx2 + 7x− 18 = 0
that has roots
(x + 9)(x− 2) = 0⇒ x = −9, 2
so our solutions are all of the form
bk = λ1(−9)k + λ2(2)k
Solution
and when we apply the initial conditions we get
0 = λ1(−9)0 + λ2(2)0
8 = λ1(−9)1 + λ2(2)1
which leads to the system {λ1+λ2=0
-9λ1+2λ2=8
which has solutions λ1 = − 811 and λ2 = 8
11so all solutions of our recurrence relation are of the form
bk = −811
(−9)k +8
11(2)k
Solution
and when we apply the initial conditions we get
0 = λ1(−9)0 + λ2(2)0
8 = λ1(−9)1 + λ2(2)1
which leads to the system {λ1+λ2=0
-9λ1+2λ2=8
which has solutions λ1 = − 811 and λ2 = 8
11so all solutions of our recurrence relation are of the form
bk = −811
(−9)k +8
11(2)k
Solution
and when we apply the initial conditions we get
0 = λ1(−9)0 + λ2(2)0
8 = λ1(−9)1 + λ2(2)1
which leads to the system {λ1+λ2=0
-9λ1+2λ2=8
which has solutions λ1 = − 811 and λ2 = 8
11
so all solutions of our recurrence relation are of the form
bk = −811
(−9)k +8
11(2)k
Solution
and when we apply the initial conditions we get
0 = λ1(−9)0 + λ2(2)0
8 = λ1(−9)1 + λ2(2)1
which leads to the system {λ1+λ2=0
-9λ1+2λ2=8
which has solutions λ1 = − 811 and λ2 = 8
11so all solutions of our recurrence relation are of the form
bk = −811
(−9)k +8
11(2)k
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
fn+1 = 2fn + 3fn−1
if f0 = f1 = 2.
Our characteristic equation here is
xn − 2xn−1 − 3xn−2 = 0
and dividing by xn−2 gives
x2 − 2x− 3 = 0.
with characteristic roots are α1 = 3 and α2 = −1.Since the roots aredistinct we know all solutions of fn are of the form
fn = λ1(3)n + λ2(−1)n
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
fn+1 = 2fn + 3fn−1
if f0 = f1 = 2.
Our characteristic equation here is
xn − 2xn−1 − 3xn−2 = 0
and dividing by xn−2 gives
x2 − 2x− 3 = 0.
with characteristic roots are α1 = 3 and α2 = −1.Since the roots aredistinct we know all solutions of fn are of the form
fn = λ1(3)n + λ2(−1)n
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
fn+1 = 2fn + 3fn−1
if f0 = f1 = 2.
Our characteristic equation here is
xn − 2xn−1 − 3xn−2 = 0
and dividing by xn−2 gives
x2 − 2x− 3 = 0.
with characteristic roots are α1 = 3 and α2 = −1.Since the roots aredistinct we know all solutions of fn are of the form
fn = λ1(3)n + λ2(−1)n
Distinct Roots
ExampleSolve the linear homogeneous recurrence relation
fn+1 = 2fn + 3fn−1
if f0 = f1 = 2.
Our characteristic equation here is
xn − 2xn−1 − 3xn−2 = 0
and dividing by xn−2 gives
x2 − 2x− 3 = 0.
with characteristic roots are α1 = 3 and α2 = −1.Since the roots aredistinct we know all solutions of fn are of the form
fn = λ1(3)n + λ2(−1)n
The Rest of the Solution
using our initial conditions, we have
2 = λ1(3)0 + λ2(−1)0
2 = λ1(3)1 + λ2(−1)1
which gives the system of equations{λ1+λ2=23λ1-λ2=2
Solving gives λ1 = 1 and λ2 = 1, and so all solutions are of the form
fn = 3n + (−1)n
The Rest of the Solution
using our initial conditions, we have
2 = λ1(3)0 + λ2(−1)0
2 = λ1(3)1 + λ2(−1)1
which gives the system of equations{λ1+λ2=23λ1-λ2=2
Solving gives λ1 = 1 and λ2 = 1, and so all solutions are of the form
fn = 3n + (−1)n
The Rest of the Solution
using our initial conditions, we have
2 = λ1(3)0 + λ2(−1)0
2 = λ1(3)1 + λ2(−1)1
which gives the system of equations{λ1+λ2=23λ1-λ2=2
Solving gives λ1 = 1 and λ2 = 1, and so all solutions are of the form
fn = 3n + (−1)n
Multiple Roots
ExampleSolve the linear homogeneous recurrence relation
an = 7an−1 − 16an−2 + 12an−3
with a0 = 1, a1 = 2 and a2 = 0.
We proceed as before and write the characteristic equation.
xn − 7xn−1 + 16xn−2 − 12xn−3
and then dividing by xn−3 gives
x3 − 7x2 + 16x− 12 = 0
Multiple Roots
ExampleSolve the linear homogeneous recurrence relation
an = 7an−1 − 16an−2 + 12an−3
with a0 = 1, a1 = 2 and a2 = 0.
We proceed as before and write the characteristic equation.
xn − 7xn−1 + 16xn−2 − 12xn−3
and then dividing by xn−3 gives
x3 − 7x2 + 16x− 12 = 0
Solution
This factors to (x− 2)2(x− 3) = 0. Let α1 = α2 = 2 and α3 = 3.
So, the solutions to this relation are of the form
an = λ1αn1 + λ2nαn
1 + λ3αn3
When we apply the initial conditions, we see
a0 = λ1 + λ3 = 1
a1 = 2λ1 + 2λ2 + 3λ3 = 2
a2 = 4λ1 + 8λ2 + 9λ3 = 0
Solving gives λ1 = 5, λ2 = 2 and λ3 = −4. So, our solution is
an = 5 · 2n + 2 · n2n − 4 · 3n
oran = (5 + 2n)2n − 4 · 3n
Solution
This factors to (x− 2)2(x− 3) = 0. Let α1 = α2 = 2 and α3 = 3.So, the solutions to this relation are of the form
an = λ1αn1 + λ2nαn
1 + λ3αn3
When we apply the initial conditions, we see
a0 = λ1 + λ3 = 1
a1 = 2λ1 + 2λ2 + 3λ3 = 2
a2 = 4λ1 + 8λ2 + 9λ3 = 0
Solving gives λ1 = 5, λ2 = 2 and λ3 = −4. So, our solution is
an = 5 · 2n + 2 · n2n − 4 · 3n
oran = (5 + 2n)2n − 4 · 3n
Solution
This factors to (x− 2)2(x− 3) = 0. Let α1 = α2 = 2 and α3 = 3.So, the solutions to this relation are of the form
an = λ1αn1 + λ2nαn
1 + λ3αn3
When we apply the initial conditions, we see
a0 = λ1 + λ3 = 1
a1 = 2λ1 + 2λ2 + 3λ3 = 2
a2 = 4λ1 + 8λ2 + 9λ3 = 0
Solving gives λ1 = 5, λ2 = 2 and λ3 = −4. So, our solution is
an = 5 · 2n + 2 · n2n − 4 · 3n
oran = (5 + 2n)2n − 4 · 3n
Solution
This factors to (x− 2)2(x− 3) = 0. Let α1 = α2 = 2 and α3 = 3.So, the solutions to this relation are of the form
an = λ1αn1 + λ2nαn
1 + λ3αn3
When we apply the initial conditions, we see
a0 = λ1 + λ3 = 1
a1 = 2λ1 + 2λ2 + 3λ3 = 2
a2 = 4λ1 + 8λ2 + 9λ3 = 0
Solving gives λ1 = 5, λ2 = 2 and λ3 = −4. So, our solution is
an = 5 · 2n + 2 · n2n − 4 · 3n
oran = (5 + 2n)2n − 4 · 3n
One More with Multiple Roots
ExampleSolve the linear recurrence relation
dn = 4dn−1 − 4dn−2
where d0 = 1 and d1 = 2.
Our characteristic equation is
xn − 4xn−1 + 4xn−2 = 0
and dividing by xn−2 gives
x2 − 4x + 4 = 0
which factors to(x− 2)2 = 0
which has roots x = 2 with multiplicity 2
One More with Multiple Roots
ExampleSolve the linear recurrence relation
dn = 4dn−1 − 4dn−2
where d0 = 1 and d1 = 2.
Our characteristic equation is
xn − 4xn−1 + 4xn−2 = 0
and dividing by xn−2 gives
x2 − 4x + 4 = 0
which factors to(x− 2)2 = 0
which has roots x = 2 with multiplicity 2
One More with Multiple Roots
ExampleSolve the linear recurrence relation
dn = 4dn−1 − 4dn−2
where d0 = 1 and d1 = 2.
Our characteristic equation is
xn − 4xn−1 + 4xn−2 = 0
and dividing by xn−2 gives
x2 − 4x + 4 = 0
which factors to(x− 2)2 = 0
which has roots x = 2 with multiplicity 2
One More with Multiple Roots
ExampleSolve the linear recurrence relation
dn = 4dn−1 − 4dn−2
where d0 = 1 and d1 = 2.
Our characteristic equation is
xn − 4xn−1 + 4xn−2 = 0
and dividing by xn−2 gives
x2 − 4x + 4 = 0
which factors to(x− 2)2 = 0
which has roots x = 2 with multiplicity 2
One More with Multiple Roots
which means that our solutions are of the form
dn = λ12n + λ2n2n
and using the initial conditions we see
d0 = λ120 + λ2(0)20 = 1
d1 = λ121 + λ2(1)21 = 2
which gives the system of equations{λ1=1
2λ1+2λ2=2
with solution λ1 = 1 and λ2 = 0and finally, this gives that all solutions are of the form
dn = 2n
One More with Multiple Roots
which means that our solutions are of the form
dn = λ12n + λ2n2n
and using the initial conditions we see
d0 = λ120 + λ2(0)20 = 1
d1 = λ121 + λ2(1)21 = 2
which gives the system of equations{λ1=1
2λ1+2λ2=2
with solution λ1 = 1 and λ2 = 0and finally, this gives that all solutions are of the form
dn = 2n
One More with Multiple Roots
which means that our solutions are of the form
dn = λ12n + λ2n2n
and using the initial conditions we see
d0 = λ120 + λ2(0)20 = 1
d1 = λ121 + λ2(1)21 = 2
which gives the system of equations{λ1=1
2λ1+2λ2=2
with solution λ1 = 1 and λ2 = 0and finally, this gives that all solutions are of the form
dn = 2n
One More with Multiple Roots
which means that our solutions are of the form
dn = λ12n + λ2n2n
and using the initial conditions we see
d0 = λ120 + λ2(0)20 = 1
d1 = λ121 + λ2(1)21 = 2
which gives the system of equations{λ1=1
2λ1+2λ2=2
with solution λ1 = 1 and λ2 = 0
and finally, this gives that all solutions are of the form
dn = 2n
One More with Multiple Roots
which means that our solutions are of the form
dn = λ12n + λ2n2n
and using the initial conditions we see
d0 = λ120 + λ2(0)20 = 1
d1 = λ121 + λ2(1)21 = 2
which gives the system of equations{λ1=1
2λ1+2λ2=2
with solution λ1 = 1 and λ2 = 0and finally, this gives that all solutions are of the form
dn = 2n