# Is there any way I can make an explicit formula for the sequance $a_n=x+ya_{n-1}$?

Let $$a_n$$ be a sequence defined by recursion: $$a_n=x+ya_{n-1}, a_1=k$$. For example, if $$(x,y)=(3,5)$$, then the sequence would go
$$a=\{k,\space 3+5k,\space 3+5(3+5k),\space ...\}$$ Is there an explicit formula for $$a_n$$? If not, is there a way to tell if a number is a member of $$a$$?

• Here is a related question. Apr 27 '20 at 0:10

Just another solution.

Considering $$a_n=x+y\,a_{n-1}$$ let $$a_n=b_n+k$$ and replace $$b_n+k=x +y\ b_{n-1}+k y$$ Let $$k=x+k y \implies k=\frac x{1-y}$$ (if $$y \neq 1$$) to make $$b_n=y \,b_{n-1}$$ which is simple.

Solve for $$b_n$$ and $$a_n=b_n+\frac x{1-y}$$

– robjohn
Apr 27 '20 at 3:38
• @robjohn. In French, we have an expression "great minds meet". The problem is that I am not ! Cheers and thanks. Apr 27 '20 at 3:44
• Silly question: why does $k=x+ky$? Apr 27 '20 at 14:06
• @CatPerson. Just to make the constant term equal to zero Apr 27 '20 at 14:43
• @CatPerson. We solve for $k$ such that ........ Apr 27 '20 at 18:50

Hint: Let $$b_n = a_{n+1}-a_n$$. Then $$b_n = y b_{n-1}$$. Can you finish?

• – lhf
Apr 26 '20 at 20:50