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

Recurrence relation $f(n)=2f(n-1)+n\log(n)$

How to solve the following recurrence relation: $f(n)=2f(n-1)+n\log(n)$ ? I tried to write $f(n-1)=2f(n-2)+(n-1)\log(n-1)$, so $f(n)=4f(n-2)+2(n-1)\log(n-1)+n\log(n)$ and then the general relation at the $k$'s iteration level is complicated, is…
2
votes
1 answer

Solve a non-homogeneous recurrence relation

I need to solve this equation. I know how to solve the homogeneous side, but when I get to the non-homogeneous it becomes a problem. $$ a_n = 7a_{n-1}- 10a_{n-2}+5^n-6$$ So far I have this $$ a_n = 7a_{n-1}- 10a_{n-2}$$ $$ \frac{r^n}{r^{n-2}} =…
2
votes
3 answers

Closed Form of Recurrence Relation

I have a recurrence relation defined as: $$f(k)=\frac{[f(k-1)]^2}{f(k-2)}$$ Wolfram Alpha shows that the closed form for this relation is: $$ f(k)=\exp{(c_2k+c_1)} $$ I'm not really sure how to go about finding this solution (it's been a few…
2
votes
2 answers

Can you easily prove $G (k) = \alpha \cdot F (k)$?

Can you easily prove $G (k) = \alpha \cdot F (k)$? Some time ago we did a very cumbersome proof but I am convinced that some good idea can provide a simple proof. This will be an auxiliary result in an investigation related to the Last…
2
votes
0 answers

solve the recurrence relation $a_{n+2}-6a_{n+1}+9a_n=3(2^n)+7{n \choose 3}$

$$a_{n+2}-6a_{n+1}+9a_n=3(2^n)+7{n \choose 3} , a_2=4,a_1=1,n\ge3$$ my try: (1) $a_n=a^{h}_n+a^{p}_n$ (2) solving homogeous part: $x^2-6x+9=0$ so $x=3$. then we have $a^{h}_n=(k_1+nk_2)3^n$. (3) solving particular part: suppose $a_n=A2^n$ then…
2
votes
0 answers

Solve using induction $T(n) = 2T(\frac{n}{2}+16)+n$

I have to solve the above recurrence relation using induction method but I am kind of lost. My attempt was $$T(n)=2T\left(\frac{n}{2}+16\right)+n.$$ Then I took, $\frac{n}{2}+16$ in the place of n \begin{align*} T(n)&=…
2
votes
1 answer

Finding a linear recurrence regarding strings

The question is Let $T(n)$ be the number of length-$n$ strings of letters $a$, $b$ and $c$, that do not contain three consecutive $a$'s. Give a recurrence relation for $T(n)$ and justify it. (You do not have to solve it.) How would I go about…
2
votes
4 answers

Solving recurrence relation, $a_n=6a_{n-1} - 5a_{n-2} + 1$

I'm trying to solve this recurrence relation: $$ a_n = \begin{cases} 0 & \mbox{for } n = 0 \\ 5 & \mbox{for } n = 1 \\ 6a_{n-1} - 5a_{n-2} + 1 & \mbox{for } n > 1 \end{cases} $$ I calculated generator function as: $$ A = \frac{31x -…
2
votes
1 answer

Finding the explicit formula given recursion

This is the recursive formula: $$\begin{cases} a_1=1/2,\\ a_n= \sqrt {\frac {a_{n-1}+1}{2}} \end{cases}$$ I have calculated the first 4 terms to be $\frac12, \frac {\sqrt3}2, \frac {\sqrt{\sqrt3+2}}2, \frac {\sqrt{\sqrt{\sqrt3+2}+2}}2$ How can I…
2
votes
2 answers

Solution to Recurrence Relation

I asked a question previously, about how to describe $$ f(n) = n^3 $$ As a recurrence relation. I was, quite rightly, given $a_1=1$ and $a_{n+1}=a_n+3n^2+3n+1$. I have attempted to solve it, using forward substitution, but I'm having trouble. I…
2
votes
1 answer

Proof of Linear Homogenous Recurrence Relations with constant coefficient and with two distinct roots

I was going through the book "Discrete Mathematics and its Application" by Kenneth Rosen where I came across the proof the following theorem. The backward proof is fine but I did not feel the forward proof of quite satisfactory. Theorem: Let $c_1$…
2
votes
1 answer

How can I write this recurrence in terms of summations and products?

I have the following recurrence formula: $$ w_i = \frac{n(n-1)}{(n-i)(i+1)} + \frac{i-1}{i+1}w_{i-1} $$ that is defined for $i = 1,\cdots, n$. I would like to write it in terms of just $i$ and $n$, without the $w_{i-1}, so I imagine the formula…
2
votes
1 answer

A cake problem reduced to recursion.

The question goes: There are $100$ people and a cake. The first person gets $1$% of the cake, the next gets $2$% of the remaining cake, and so on. Find out which person gets the highest amount of cake. This was given to me by one of my friends,…
2
votes
1 answer

Pascal Triangle Related Problem: Fibonacci Sequence on sides

I have this triangle: $$\begin{array}{} &&&&&&&1\\ &&&&&&1&&1\\ &&&&&2&&2&&2\\ &&&&3&&4&&4&&3\\ &&&5&&7&&8&&7&&5\\ &&8&&12&&15&&15&&12&&8\\ &13&&20&&27&&30&&27&&20&&13\\ 21&&33&&47&&57&&57&&47&&33&&21 \end{array}$$ (Original image.) As you can see…
Guest
  • 21
2
votes
1 answer

What is the complexity of recurrence $T(n)=T(n/2)+T(n/4)+T(n/6)+T(n/12)+1$

I'm try to find the solution to the recurrence $T(n)=T(n/2)+T(n/4)+T(n/6)+T(n/12)+1$ I tried this, if T(n) = O(n) $ \begin{align} T(n) &\le c(n/2)+c(n/4)+c(n/6)+c(n/12)+1 \\ &= cn+1 \\ &\le cn \ \ (not\ true) \end{align} $ if T(n) =…