Answer: A;B;C
The given recurrence relation is the classic Josephus recurrence:
f(1)f(2n)f(2n+1)=1=2f(n)−1,for n≥1=2f(n)+1,for n≥1
Any positive integer N can be uniquely written in the form N=2m+l, where m≥0 and 0≤l<2m. The closed-form solution for this recurrence is:
f(2m+l)=2l+1
Let us evaluate each option using this closed-form expression:
- Option A: For f(2n−1), we can write 2n−1=2n−1+(2n−1−1). Here, m=n−1 and l=2n−1−1.
Applying the formula:
f(2n−1)=2(2n−1−1)+1=2n−2+1=2n−1
Thus, Option A is TRUE.
- Option B: For f(2n), we can write 2n=2n+0. Here, m=n and l=0.
Applying the formula:
f(2n)=2(0)+1=1
Thus, Option B is TRUE.
- Option C: For f(5⋅2n), we can write 5⋅2n=2n+2+2n. Here, m=n+2 and l=2n (since 2n<2n+2).
Applying the formula:
f(5⋅2n)=2(2n)+1=2n+1+1
Thus, Option C is TRUE.
- Option D: For f(2n+1), we can write 2n+1=2n+1. Here, m=n and l=1.
Applying the formula:
f(2n+1)=2(1)+1=3
This is not equal to 2n+1 for n>1. Thus, Option D is FALSE.