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
1 answer

Difficult partial solution to a reccurence equation

I am trying to help a friend of mine solve $$ a_n + 5 a_{n-1} + 6 a_{n-2} = 12n - 2(-1)^n$$ Now the homogenous solution is easy to find, and one just needs to solve the equation $r^2 + 5r + 6 = 0$ Which has roots $r=-2$ and $r-3$, so the homogenous…
2
votes
1 answer

Solve recurrence: $T_n =\frac{1}{n}(T_{n-1} + T_{n - 2} + T_{n - 3} + \dots + T_2 + T_1 + T_0) + 1$ with $T_0 = 0$

Solve recurrence: $T_n =\frac{1}{n}(T_{n-1} + T_{n - 2} + T_{n - 3} + \dots + T_2 + T_1 + T_0) + 1$ with $T_0 = 0$. The recurrence is defined only on nonnegative integers. Thanks.
abw333
  • 163
2
votes
2 answers

Recurrence relation for pairing off $2n$ people

I know the answer is supposed to be $$a_{2n} = (2n-1) a_{2n-2}$$ Can someone please explain why shouldn't be having $\binom{2n}{2}$ in place of $2n-1$? Doesn't it matter which two people are paired off out of the $2n$ people and hence generating a…
ps_
  • 73
2
votes
1 answer

Solving an inhomogeneous difference equation

Consider the following difference equation: $$-(1+a)u_{i-1} + 2 u_i - (1-a) u_{i+1} - \frac{h^2}{\epsilon} = 0, \; i = 1, ..., N, \tag{1}$$ $$u_0 = 0, \; u_N = 1.$$ Can someone explain me how to solve this equation? I read somewhere the following…
2
votes
0 answers

two dimensional recurrence

We have the following recurrence relation for $a_{n,m}$ $a_{n,m}=4a_{n+1,m-1}+\sum_{i=0}^{n-1}\sum_{j=0}^{m}a_{i,j}a_{n-1-i,m-j}$ with the boundary condition $a_{n,0}=c_n$ for $n\ge0$ where $c_n$ are the Catalan numbers and $a_{0,m}=0$ for $m>0$.…
Juraj
  • 21
2
votes
1 answer

Solving a set of linked recurrent relations

I'm trying to find a method how to solve this set of linked recurrent relations. $$ \left\{\begin{matrix} a_{n} = 3*a_{n-1} + b_{n-1}\\ b_{n} = 2*a_{n-1} + 2*b_{n-1}\\ c_{n} = b_{n-1} + 3*c_{n-1}\\ d_{n} = a_{n-1} + 2*b_{n-1} + 3*c_{n-1}\\ e_{n}…
2
votes
3 answers

How to prove a formula involving polynomial sequences and their recursive representation

If we have a sequence defined by the polynomial $a_n=\displaystyle \sum_{k=0}^{m}c_kn^k$, then how can we prove that $a_n=\displaystyle \sum_{k=1}^{m+1}\binom{m+1}{k} (-1)^{k-1}a_{n-k}$? *Edited to fix the typo, and also simplified
Wesley
  • 1,567
2
votes
6 answers

Recurrence relation - $f(0) = 0$, $f(n+1) = f(n) + \frac{1}{2^n}$

I wanted to solve the following recurrence relation: $$f(0) = 0$$ $$f(n+1) = f(n) + \frac{1}{2^n}$$ By looking at a few values I came up with: $$f(n) = 2 - 2^{1-n}$$ which I could prove by mathematical induction. But is there a way to solve this…
Jonny
  • 77
2
votes
1 answer

Polynomial solution of non-homogeneous linear recurrence relation

Suppose we have a non-homogeneous linear recurrence relation $$ a(n) + c_{1}a(n-1) + \dots + c_{d}a(n-d) = p(n), \,\, n\in\mathbb{Z} $$ where $c_1,\dots, c_d$ are constants. If $p(n)$ is a polynomial, is there always a particular solution $a(n)$…
2
votes
1 answer

Basic Recursion

Im trying to write recursive formulas for sequences but it seems like there are different techniques depending on what type of sequence I'm dealing with. for example I want to the sequence: $1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} +....…
lampShade
  • 1,053
2
votes
2 answers

Closed form of a recurrence relation containing factorials.

Let a sequence $\{x_n\}_{n\ge1}$ defined by $x_n=3nx_{n-1}+n!-3^n(n^2-2);\ \forall n\ge2$ with $x_1=10$. Find a closed form of $x_n$. I tried that $b_n=\frac{x_n-3^n}{n!}$ then the above reduces into…
mudok
  • 751
  • 6
  • 18
2
votes
2 answers

How to solve this recurrence relation $T(n) = T(n/5) + T(4n/5) + O(1)$

Given the recurrence: $$T(n) = T(n/5) + T(4n/5) + O(1)$$ The annoying part is $O(1)$. If it were some $g(n)$, then I could use recursion tree on $n$, but there is no such $n$ to start with. So I wonder what method can be used in this case? Any idea…
roxrook
  • 12,081
2
votes
1 answer

What is the method used here to convert this recurrence to closed form?

From Concrete Mathematics, there is a problem called Lines in the Plane on Page 7... At one point the recurrence is described like so: $L_n = L_{n-1} + n$ I'm not clear on how this gets accomplished during the conversion to closed form: $L_{n-1} + n…
JacobIRR
  • 147
2
votes
1 answer

Solving 2D Recurrences

Problem For a n x n grid, how many different ways are there to get from the southeast corner to the northwest corner if I can move one cell west, north, or northwest at any given time? Recurrence The number of possible paths starting at cell $(i,…
2
votes
3 answers

How to solve these recurrence relations

How do I solve the following recurrence? $$T(n) = 2T(n-2) + 4$$ I've looked online and there are only examples for how to do it without the constant at the end, and I've tried leaving it in to get a characteristic equation of $r^2 = 6$ but that…
b_pcakes
  • 1,501