I started reading the book Concrete Mathematics 2nd edition and there is a conversion I don't understand(is in page 4 of the book, equation(1.3)), it says:
We have 2 equations:
$T_0 + 1 = 1$
$T_{n+1} = 2T_{n-1} + 2$
Now, if we let $U_n = T_n + 1$, we have
$U_0 = 1$; //I understand this substitution
$U_n = 2U_{n-1}$ //this is the substitution(on the right side) it has no sense to me
It should be(according to me):
Since $2T_{n-1} + 2$ can be expressed as $2T_{n-1} + 1 + 1$
the conversion should be:
$2U_{n-1}+1$
thanks for your help guys
Looking at the book, the recurrence presented was,
$$T_{n}=2T_{n-1}+1$$
What is actually written down is,
$$T_{n}+1=2T_{n-1}+2$$
Which nicely shows that,
$$T_{n}+1=2(T_{n-1}+1)$$
A general trick is to look for a particular solution to the recurrence and then look at the solution to the homogenous equation.
There exists a constant solution to the recurrence,
$$T_{n}=2T_{n-1}+1$$
$$-1=2(-1)+1$$
Subtracting the second equation (which shows the constant solution is $-1$) from the first gives,
$$T_{n}+1=2(T_{n-1}+1)$$
With $U_{n}=T_{n}+1$ we have,
$$U_{n+1}=2U_{n}$$
Which is nothing but the corresponding homogenous recurrence relation.