Asymptotic Analysis & Recurrences

Your answer
Answer & solution
Answer: B (no official key was published)
Step 1: Remove the powers of two from the argument.
Step 2: Writing out S(1)=4, S(2)=13, S(3)=40 reveals the repeated multiply-by-three pattern. In general the homogeneous contribution is 3kS(0), while the added ones contribute 1+3+…+3k−1. Evaluating that geometric sum gives the stated formula; at k=0 it correctly returns1.
Conclusion: Put S(k)=T(2k). Then S(k)=3S(k−1)+1 with S(0)=1. Iteration gives 3k+sum_(j=0)k−13j=(3k+1−1)/2, B.