Finding a recurrence

61 Views Asked by At

I am trying to figure out a recurrence for these numbers:

$f(1)=0$

$f(4)=16$

$f(16)=128$

$f(64)=768$

The base case is $f(1)=0$ the numbers inputed into f must be powers of 4. I am not sure what the recursive formula should be.

2

There are 2 best solutions below

0
On BEST ANSWER

The recurrence is $f(n)=4n+4*f(n/4)$ with a base case of $f(1)=0$.

1
On

try this expression : $f(2^{n})=2n2^{n}$