48.3k views
4 votes
Find f(n) when n = 2k, where f satisfies the recurrence relation f(n) = f(n/2) 1 with f(1) = 1.

1 Answer

3 votes

Final answer:

The value of f(n) when n = 2k is 3.

Step-by-step explanation:

To find the value of f(n) when n = 2k, we can use the given recurrence relation f(n) = f(n/2) + 1 with initial condition f(1) = 1. We can write out the terms of the sequence:

  1. f(1) = 1
  2. f(2) = f(1/2) + 1
  3. f(4) = f(2/2) + 1 = f(1) + 1 + 1 = 1 + 1 + 1 = 3
  4. f(8) = f(4/2) + 1 = f(2) + 1 = 3 + 1 = 4
  5. f(16) = f(8/2) + 1 = f(4) + 1 = 3 + 1 = 4
  6. ...

From this pattern, we can see that for any positive integer k, f(2k) = 3.

User Elna
by
7.7k points