I have the following general closed form linear recurrence equation:
$x_n=r^{n-1}a+\left(\frac{r^{n-1}-1}{r-1}\right)d, \qquad (n=1,2,3,...)$
and the next stage in the text shows the equation rearranged as:
$x_n=\left(a+\frac{d}{r-1}\right)r^{n-1}-\frac{d}{r-1}, \qquad (n=1,2,3,...)$
I am having trouble seeing how the rearrangement has been made and why it is preferred? The first version of the equation is more readable to me, but the latter seems to be the default way it is written and referred to.
Can you help me to understand how the rearrangement has been made and why it would be preferred?
Thanks.