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
1
vote
3 answers

Write a linear recurrence of order $3$

Let $f(n)$ denote the number of bitstrings (words from the alphabet {$0, 1$}) of length $n$ which do not contain three consecutive zeros. Write a linear recurrence of order $3$ with adequate initial conditions for $f(n)$. Verify that it gives the…
1
vote
0 answers

Why the difference between the solutions of the recursions $a_n=u\cdot a_{n-1}+vn$ with $u\ne1$ and $a_n=a_{n-1}+vn$

The recurrence relation $$a_n=u\cdot a_{n-1}+vn$$ has the special solution $$a_n=\frac{v}{1-u}n-\frac{uv}{(u-1)^2}$$ for $u\ne 1$ The recurrence relation $$a_n=a_{n-1}+vn$$ has the special solution $$a_n=\frac{vn(n+1)}{2}$$ The ansatz $a_n=rn+s$ is…
Peter
  • 84,454
1
vote
2 answers

Simplifying a recurrence relation relating to trig.

How would I simplify this following recurrence relation?: $$D_{n} = (2\cos\theta)D_{n-1} - D_{n-2}, \quad D_1 = \cos \theta$$ I've tried taking differences, etc but to no avail. I can't get a simple expression for $D_n$.
1
vote
0 answers

How to solve specific recurrence relation

How would you solve this recurrence relation? $f_k(a+i b k)=f_{k-1}-f_{k+1}$ $a$ and $b$ are reals and $k$ is an integer in $-\infty$, $+\infty$, $i$ is the imaginary unit.
Andrea
  • 81
1
vote
2 answers

Recurrence relation (interest)

I am having trouble knowing what to do here. Can you give me a hint about what to solve this? It's a recurrence relation. Anything is helpful at this point. "You take a loan of S dollars that is to be paid back in T periods of time. If r is the…
George
  • 51
1
vote
0 answers

Solving a recurrence relation with imaginary numbers

I've been trying to solve this recurrence relation I used $Cr^n$ to factor which I got $r^2+r+1$, but I can't factor this, so I used the quadratic formula and I got $(-1+\sqrt{\mathstrut -3})/2$ and $(-1-\sqrt{\mathstrut -3})/2$. Is this the right…
Andrew
  • 133
1
vote
1 answer

Does this recurrence relation have a solution?

I want to know if there is an explicit solution to the following recurrence relation: $f(n+1) = \frac{1}{2} (f(n)^2 + 1)$ with the intial condition $f(1) = 3$.
1
vote
4 answers

Solve the recurrence relation $a(n) = 7a(n-1) - 10a(n-2)$

Solve the recurrence relation $a(n) = 7a(n-1) - 10a(n-2)$ Not really sure where to start. I see that I can generalize it a bit to be $$ a(n) = 7(7(a(n-1) - 10 a(n-2) - 10 ( 7(a(n-3)) - 10 (a(n-4))) $$
1
vote
0 answers

Recurrence Relation on Ternary Sequences

I have the following homework assignment: Let $s_n$ be the number of ternary sequences of length n, such that the sub-sequences 00, 01, 10, and 11 never occur. Prove that $s_n = s_{n-1} + 2s_{n-2}$ for $ n \ge 3$ with $s_1 = 3$ and $s_2 = 5$ Then…
1
vote
0 answers

Recurrence Relation Expansion

How does this recurrence relation simplify? $X_n$ = $X_{n-1}$ + $2pqX_{n-1}$ - $qX_{n-1}$ It seems like some kind of binomial expansion but I am not sure.
cprogrammer
  • 153
  • 2
  • 7
1
vote
0 answers

How would I show that $2^n - 1$ is a solution to the recurrence relation:

$a_n$ = 2$a_{n-1}$ + 1, with the initial conditions $a_0$ = 0, $a_1$ = 1 Apparently the solution is from the Tower of Hanoi problem, but having trouble coming with the this on my own.
Diante
  • 189
1
vote
2 answers

Recurrence relation - Show that there is $A$ s.t. $a_n < A \forall n \in N$

Let $a_n$ be defined such that: $a_1 = 1, a_n = \frac{1}{20} a^2_{n-1} +3 \forall n>= 2 $ Show that there is $A$ s.t. $a_n < A \forall n \in N$ Thanks in advance!
user21312
  • 966
1
vote
1 answer

Solve $f(x) = f(\lfloor x/2 \rfloor) + f(\lfloor x/3 \rfloor)$

Solve the following recurrence relation $$f(1)=1, f(2)=2\\ f(x) = f\left(\left \lfloor \frac{x}{2} \right \rfloor\right) + f\left(\left\lfloor \frac{x}{3} \right\rfloor\right), \forall x \in \mathbb{N}, x \geq 3 $$ I tried the simple ways…
Rezwan Arefin
  • 3,106
  • 1
  • 14
  • 39
1
vote
1 answer

Solving recurrence relation with boundary condition at infinity

I want to solve the following recurrence relation: \begin{align} g(x+1)=\frac{g(x)}{f(x)} \end{align} for a known function $f(x)$, defined for $x>0$ and $f(x)\in [0,1]$. I am aware that an initial condition on $g$ is required, but all I know is…
Deep
  • 621
1
vote
3 answers

solving a recurrence relation - finding the general solution

Solve the recurrence relation: $u_{n+2} = 2u_{n+1}-u_n$ $u_0 = 1 $ and $u_1 = 4$ My calculations: I have calculated that the characteristic equation is: $t^2-2t+1 = 0$ so the roots are $r_1=1$ and $r_2=1$ here is where I am stuck. The answer says…
Elias
  • 403
  • 3
  • 15