Problem:
For any positive integer k, let f1​(k) denote the square of the sum of the digits of k. For n≥2, let fn​(k)=f1​(fn−1​(k)). Find f1988​(11).
Solution:
First we observe that, perhaps after a nonrepeating initial segment, the sequence f1​(11),f2​(11),… is periodic. To see this, it suffices to note that, for k<1000,
f1​(k)≤f1​(999)=(9+9+9)2=729<1000
Next we compute fn​(11) for the first few values of n, in the hope that the length of the period is short. This expectation is reasonable since the terms of the sequence are perfect squares, and since there are only 31 perfect squares less than 1000. We find that
f1​(11)f2​(11)f3​(11)f4​(11)f5​(11)f6​(11)​=(1+1)2=4,=f1​(f1​(11))=f1​(4)=42=16,=f1​(f2​(11))=f1​(16)=(1+6)2=49,=f1​(f3​(11))=f1​(49)=(4+9)2=169,=f1​(f4​(11))=f1​(169)=(1+6+9)2=256=f1​(f5​(11))=f1​(256)=(2+5+6)2=169​
We stop at this point, since fn​(11) depends only on fn−1​(11), and hence the numbers 256 and 169 will continue to alternate. More precisely, for n≥4,
fn​(11)={169, if n is even 256, if n is odd ​
Since 1988 is even, it follows that f1988​(11)=169​.
The problems on this page are the property of the MAA's American Mathematics Competitions