Questions tagged [recurrence-relations]

Questions regarding functions defined recursively, such as the Fibonacci sequence.

A recurrence relation is an equation that recursively defines a sequence or multidimensional array of values: once one or more initial terms are given, each further term of the sequence or array is defined as a function of the preceding terms.

Simple examples include the geometric sequence $a_{n}=r a_{n-1}$, which has the closed-form $a_{n}=r^n a_0$, the aforementioned Fibonacci sequence with initial conditions $f_0=0,f_1=1$ and recurrence $f_{n+2}=f_{n+1}+f_n$, and series: the sequence $S_n =\sum_{k=1}^{n} a_k$ can be written as $S_n= S_{n-1}+a_n$.

The term order is often used to describe the number of prior terms used to calculate the next one; for instance, the Fibonacci sequence is of order 2.

See the Wikipedia page for more information.

8985 questions
2
votes
2 answers

How to solve the recurrence relation $t_n=(1+c q^{n-1})p~t_{n-1}+a +nbq$?

How to solve $$t_n=(1+c q^{n-1})p~t_{n-1}+a +nbq,\quad n\ge 2.$$ given that $$t_1=b+(1+c~p)(a~q^{-1}+b),\qquad p+q=1.$$ N.B- Some misprints in the question I corrected. Sorry for the misprint $an+b$ is actually $a+nbq$.
Litun
  • 670
2
votes
1 answer

Solve recursion relation

Let $E$ be a real number. Consider the following recurrence relation: \begin{equation} a_{n+2} (n+3)(n+2) + a_{n+1} + E a_n = 0 \end{equation} subject to $a_0 = 1$ and $a_1 = -1/2$. By using the method of generating functions I have shown -- and…
Przemo
  • 11,331
2
votes
1 answer

Proving a recurrence relation with induction

I've been having trouble with an assignment I received with the course I am following. The assignment in question: Use induction to prove that when $n \geq 2$ is an exact power of $2$, the solution of the recurrence $$T(n) = \begin{cases} 2 &…
Ruddie
  • 291
  • 3
  • 5
  • 10
2
votes
4 answers

Solving second order difference equations with non-constant coefficients

For the difference equation $$ 2ny_{n+2}+(n^2+1)y_{n+1}-(n+1)^2y_n=0 $$ find one particular solution by guesswork and use reduction of order to deduce the general solution. So I'm happy with second order difference equations with constant…
2
votes
3 answers

how to work out a closed form of a sequence

Consider the following linear recurrence sequence. $x_1 = 11$, $x_{n+1} = -0.8x_n + 9,\quad n = 1,2,3, \ldots.$ Find a closed form for this sequence.
2
votes
4 answers

How to solve the recurrence relation $T(n) = 2T(\frac{2n}{3})$, where $T(0) = T(1) = 1$?

Please explain the most elementary method of solving this recurrence relation: $$ T(n) = 2T\left(\left\lfloor\frac{2n}{3}\right\rfloor\right)$$ where $T(0) = 0$ and $T(1) = 1$.
Will
  • 940
2
votes
1 answer

Find and solve a recurrence relation for the number of n-digit ternary sequences in which no 1 appears to the right of any 2.

Find and solve a recurrence relation for the number of n-digit ternary sequences in which no 1 appears to the right of any 2. $a_1=3$ and $a_2=8$ I am having trouble creating the recurrence relation as well as evaluating. My thought for the relation…
atl
  • 451
2
votes
3 answers

Finding recurrence relation for strings of length n formed from A, B, C?

Let $S_n$ be the number of strings of length $n$ formed from letters A, B, C, that do not contain substrings AB, BA, AAA or BBB. For example, for $n = 3$, all strings with this property are: AAC, ACA, ACB, ACC, BBC, BCA, BCB, BCC, CAA, CAC, CBB,…
nikki
  • 143
1
vote
2 answers

Difference Equation

$y_{n+3} − 3 y_{n+1} + 2 y_n = (−2)^n$ I get the solution to be $y_n = A(-2)^n + Bn + C + \frac{1}{9}n(-2)^{n-1}$ but wolfram alpha gets $y(n) = c_1 (-2)^n+c_2+c_3 n+\frac{1}{27} 2^{n-1} e^{i \pi n} (4-3 n)$ Explanation required. Help is much…
Alan
  • 13
1
vote
2 answers

Show that a solution is the general solution.

Find general solution of recurrence relation $$ ax_{n+1}+bx_n+cx_{n-1}=0 $$ for two distinct roots $\alpha$ and $\beta$.. My question is: One solution is $y_n=A\alpha^n+B\beta^n$. But how does one show that this is the general solution?
user34632
1
vote
0 answers

Recurrence relations and their solutions

I recently read an article about difference equations and found the solution of the fibonacci recurence there. It is this function: $f(n) = \frac{1}{\sqrt5}\left (\frac{1+\sqrt5}{2} \right )^{n}- \frac{1}{\sqrt5}\left (\frac{1-\sqrt5}{2} \right…
LearningMath
  • 1,201
1
vote
2 answers

Solving recurrence with non constant coefficients

I am having a hard time to solve the following $a_k=\left(\frac{d}{2}\right)^{k-2}a_{k-2}$ where $d$ is a parameter and $a_0=1$ $a_1=d$. Will appreciate your help. Thanks!
1
vote
1 answer

Solve the recurrence relation $x_{n+2} -3x_{n+1} + 2 x_n = n$

Solve $$x_{n+2} -3x_{n+1} + 2 x_n = n$$ when $x_0 = 1$ and $x_1 = 0$. I started with the homogen solution: $$r^2 -3r +2 = 0$$ So $$x_n^h = A1^n + B2^n$$ I know that $x_n = x_n^p + x_n^h$ But I fail with the particulair solution $x_n^p$. I thought…
iveqy
  • 1,327
1
vote
1 answer

Getting recursive formula to since solution

Is there any way to get the recursive formula of the form $r_n=\alpha r_{n-1}+\beta$ to single formula as a function of $n$. I've seen results that find single formula as function of $n$ for geometric series and such but can't seem to find any…
Kamster
  • 1,970
  • 16
  • 18
1
vote
2 answers

How do I solve this recurrence relation?

Given a recursive relation $$a_n = \begin{cases} (1 - 2b_n)a_{n-1} + b_n, & n > 1 \\ \frac{1}{2}, & n =1 \end{cases} $$, how can I expression $a_n$ in term of $b_i, i \in \{1, 2, \dots n\}$?