Define a function on the positive integers recursively by , if is even, and if is odd and greater than . What is ?
Problem 136
Official solutions — 2
Solution 1
This is a recursive function, which means the function refers back to itself to calculate subsequent terms. To solve this, we must identify the base case, . We also know that when is odd, . Thus we know that . Thus we know that n will always be odd in the recursion of , and we add each recursive cycle, which there are of. Thus the answer is , which is answer
.
Note that when you write out a few numbers, you find that for any , so
Solution 2
1. Define the function on the positive integers recursively:
2. Define a new function . We start with:
3. Analyze the behavior of for even :
Therefore, when is even.
4. Analyze the behavior of for odd :
Therefore, when is odd.
5. From the above steps, we see that is constant for all . Since , we have:
6. Therefore, for any :
7. Specifically, for :
The final answer is