After attempting question 1.16 of Concrete Mathematics,
$g(1)=\alpha$
$g(2n+j)=3g(n)+\gamma n+ \beta_j, j=0,1$
I am having some difficulty getting the correct answer.
The following is my working:
$ g(n)=A(n)\alpha + B_0(n)\beta_0 + B_1(n)\beta_1 + C(n)\gamma$
Using $\alpha =1$ and $\beta_0,\beta_1,\gamma=0$
I get $A(2^m+l)=3^m$
Using $g(n)=1$
I get $g(n)=A(n)-2B_0(n)-2B_1(n)=1$
Using $g(n)=n$
I get $g(n)=A(n)+B_1(n)-C(n)=n$
Using $g(n)=n^2$
I get $g(n)=A(n)-2B_0(n)+3B_1(n)+3C(n)=n^2$
However, with these 4 equations I am unable to get an answer that tallies with the values n=5 of the recurrence, i.e. $g(5)=9α+3β0+β1+5γ$
i.e. $g(5)=9\alpha + 3\beta_0 + \beta_1 + 5\gamma$
– switch May 13 '20 at 04:15