0

Problem:

Formally speaking lets say we have,

$ F_n = a_{k}F_{n-1} + a_{k-1}F_{n-2} + a_{k-2}F_{n-3} + \cdots + a_1F_{n-k} $

Base case being,

$F_0 = b_0\\F_1 = b_1\\ \cdots\\F_{k-1} = b_{k-1}$

We are to find the generating function of this recurrence relation in terms of the coefficients $a_i$ and $b_j$.

My attempts:

From symmetry the solution I get is $f(x)(1 - a_k - a_{k-1}x - a_{k-2}x^2 \cdots - a_{k-(k-1)}x^{k-1}) = b_0 + (b_0+b_1)x + (b_0+b_1+b_2)x^2 + \cdots + (b_0+b_1+b_2+ \cdots b_{k-1})x^{k-1}$

$\implies f(x)= \frac {b_0 + (b_0+b_1)x + (b_0+b_1+b_2)x^2 + \cdots + (b_0+b_1+b_2+ \cdots b_{k-1})x^{k-1}}{1-a_k-a_{k-1}x-a_{k-2}x^2- \cdots -a_{k-(k-1)}x^{k-1}} $

where $f(x)$ is the generating function. But I am not sure I can prove it.

Also I would like to express the $t_{th}$ term ie coefficient of $x^t$ in the above. There should be a way to express in $kxk-matrix$ form $M$ such that $M^t[1][1]$ might have the computed coefficients of $x^t$ .

PS:

I have seen many recurrence relation questions across math.stack exchange like this or this or youtube tutorials like this or this but no one seems to be making any effort to generate a generalised formula for it.

This seems to be the closest where they seem to have done the reverse of my question.

This should be well know as I found there is even a wolframalpha tool doing it

  • Suppose $G(x)=\sum_{n=0}^{\infty}x^n F_n.$ Then $(1-\sum_{i=1}^kx^{k-i}a_i)G(x)$ is a polynomial $P(x)$ which is determined by $a_1,...,a_k.$ So $G(x)=\frac {P(x)}{1-\sum_{i=1}^kx^{k-i}a_i}$ – DanielWainfleet Feb 07 '23 at 15:21
  • The matrix approach is to let $v_n:=(F_n,F_{n-1},ldots,F_{n-k}$ and define $M$ such that $v_{n+1}=Mv_n$. Specifically, the first row of $M$ will be $(a_1,a_2,\ldots,a_k)$ while every other after that will be zero except for those with $M_{k,k+1}=1$. From there one can in principle diagonalize $M$ in order to compute powes of $M$ efficiently. – Semiclassical Feb 07 '23 at 22:12
  • @Semiclassical where will the $b_i$'s fit in that matrix then ? I guess you are talking about a special case where $b_0=1,b_{i>0}=0$ ? – sibillalazzerini Feb 07 '23 at 22:25
  • No. The $b$’s will determine the values of $v_n$ for small $n$. They don’t enter into the matrix $M$. – Semiclassical Feb 07 '23 at 23:15

0 Answers0