A positive integer is input into a machine. If is odd, the output is . If is even, the output is . This process can be repeated using each successive output as the next input. If the input is and the machine is used 51 times, what is the final output?
Solution
If is odd, the output is , which is even because it is the sum of two odd integers. If is even, the output is , which is odd, because it is the sum of an even integer and an odd integer. Starting with and using the machine 2 times, we obtain . Starting with 23 and using the machine 2 times, we obtain . Starting with an odd integer and using the machine 2 times, the net result is adding 8 to the input, because the odd input generates a first output that is 3 larger (and so even) and a second output that is 5 larger than the first output. This generates a net result that is larger than the input. Therefore, using the machine 46 more times (that is, repeating the 2 steps a total of 23 more times), we add 8 a total of 23 more times to obtain the output . To this point, the machine has been used 50 times. Using the machine for the 51st time, and so the final output is 218.