Answer: B
We are given the recurrence relation:
T(2k)=3T(2k−1)+1
with the base case T(1)=1. Since 1=20, we have T(20)=1.
Let tk=T(2k). We can rewrite the recurrence in terms of k as:
tk=3tk−1+1for k≥1
with the base case t0=1.
By expanding this recurrence relation step-by-step:
tk=3tk−1+1=3(3tk−2+1)+1=32tk−2+3+1=32(3tk−3+1)+3+1=33tk−3+32+3+1 ⋮=3kt0+i=0∑k−13i
Substituting t0=1 and using the formula for the sum of a geometric progression:
tk=3k+3−13k−1=3k+23k−1=22⋅3k+3k−1=23⋅3k−1=23k+1−1
Thus, the solution is T(2k)=23k+1−1, which corresponds to option B.