Yeseo has written a program. After she inputs a number into the program the number is multiplied by \(3\), then \(4\) is added to the product, then the sum is divided by \(3\). The final result is then printed.
Yeseo inputs the number \(2\) into the program. Following the steps outlined, the number \(2\) is first multiplied by \(3\) to obtain \(6\). Then \(4\) is added to the product to obtain \(10\). Finally, this sum is divided by \(3\) to obtain \(\frac{10}{3}\). The number \(\frac{10}{3}\) is then printed.
Yeseo then inputs the output \(\frac{10}{3}\) into the program. If Yeseo continues this process of taking the output number and using it as the next input, then what will be the 1000th number she inputs into the program?
One way to solve this problem would be to work through all the different input numbers that Yeseo would have by following the steps in the program. However, since we are looking for the 1000th input number, this is definitely not the most efficient solution.
Instead, we will first determine the first few input numbers. These are shown in the table.
| Input | After Multiplying by \(3\) | After Adding \(4\) | After Dividing by \(3\) |
|---|---|---|---|
| \(2\) | \(6\) | \(10\) | \(\frac{10}{3}\) |
| \(\frac{10}{3}\) | \(10\) | \(14\) | \(\frac{14}{3}\) |
| \(\frac{14}{3}\) | \(14\) | \(18\) | \(\frac{18}{3} = 6\) |
| \(6\) | \(18\) | \(22\) | \(\frac{22}{3}\) |
| \(\frac{22}{3}\) | \(22\) | \(26\) | \(\frac{26}{3}\) |
| \(\frac{26}{3}\) | \(26\) | \(30\) | \(\frac{30}{3}=10\) |
So the first seven input numbers are \(2\), \(\frac{10}{3}\), \(\frac{14}{3}\), \(6\), \(\frac{22}{3}\), \(\frac{26}{3}\), and \(10\). It appears as though the input numbers are increasing by \(\frac{4}{3}\) each time. We can show this algebraically. Suppose an input number is \(p\). Then following the steps in the program, we first multiply by \(3\) to obtain \(3p\). We then add \(4\) to obtain \(3p+4\). Finally, we divide by \(3\) to obtain \(\frac{3p+4}{3}\). This can be simplified as follows: \[\frac{3p+4}{3} = \frac{3p}{3} + \frac{4}{3} = p+ \frac{4}{3}\] Thus, for any input number \(p\), the output (and next input number) will be \(p+\frac{4}{3}\).
We will let \(t_1\) be the first input number, \(t_2\) be the second input number, and so on. Thus, we want to find \(t_{1000}\). Using this notation, we now show three different solutions.
Solution 1
Since the difference between consecutive input numbers is \(\frac{4}{3}\), then to get from \(t_1\) to \(t_{1000}\), we must add \(\frac{4}{3}\) a total of \(999\) times. Therefore, \[\begin{aligned} t_{1000} &= t_1+999 \times \frac{4}{3}\\ &= 2+999 \times \frac{4}{3}\\ &=2+1332 \\ &= 1334 \end{aligned}\] Thus, the 1000th input number is \(1334\).
Solution 2
Since the difference between consecutive input numbers is \(\frac{4}{3}\), it follows that the difference between every third input number is \(3 \times \frac{4}{3} = 4\). Since the first input number, \(2\), is an integer, it follows that every third input number after that will also be an integer, and that these integer values form a sequence that is increasing by \(4\) each time. Since \(1000 = 1 + 3 \times 333\), then starting from \(t_1\), we must add \(4\) a total of \(333\) times to reach \(t_{1000}\). Therefore, \[\begin{aligned} t_{1000} &= t_1+333 \times 4\\ &=2+333 \times 4 \\ &= 1334 \end{aligned}\] Thus, the 1000th input number is \(1334\).
Solution 3
Since the difference between consecutive input numbers is \(\frac{4}{3}\), if all input numbers are written with a denominator of \(3\), then the difference between the numerators of consecutive input numbers is \(4\). Thus, we can think of the numerators of consecutive input numbers as a sequence that starts at \(6\) (since \(2=\frac{6}{3}\)) and increases by \(4\) each time. This sequence can be written as \(4n+2\), where \(n=1\) represents the first input number, \(n=2\) represents the second input number, and so on. Thus, \(t_n=\frac{4n+2}{3}\) for any \(n \ge 1\). Therefore, \[t_{1000} = \frac{4(1000)+2}{3} = \frac{4002}{3} = 1334\] Thus, the 1000th input number is \(1334\).