For any positive integer $k$, let $f_1(k)$ denote the square of the sum of the digits of $k$. For $n>1$, let $f_n(k)=f_1(f_{n-1}(k))$. Find $f_{1988}(11)$
I got the answer as 256 can anybody please verify
For any positive integer $k$, let $f_1(k)$ denote the square of the sum of the digits of $k$. For $n>1$, let $f_n(k)=f_1(f_{n-1}(k))$. Find $f_{1988}(11)$
I got the answer as 256 can anybody please verify
On
We are just iterating $f_1$ $1988$ times here. From the given start of $11$ we see that $$f_1(11)=4$$ $$f_2(11)=f_1(4)=16$$ $$f_3(11)=49$$ $$f_4(11)=169$$ $$f_5(11)=256$$ $$f_6(11)=169$$ and we find that for even and odd $n\ge4$, $f_n(11)=169$ and $f_n(11)=256$ respectively. Thus $f_{1988}=169$, not $256$ as you said.
Just start iterating through the functions (often this will give us the answer, but even when it doesn't, it'll help us understand the structure of the problem)
$$\begin{array}{c|c} n & f_n(11) \\ \hline 1 & (1+1)^2 = 4 \\ 2 & 4^2 = 16 \\ 3 & (1+6)^2 = 49 \\ 4 & (4+9)^2 = 169 \\ 5 & (1 + 6 + 9)^2 = 256 \\ 6 & (2 + 5 + 6)^2 = 169 \\ 7 & (1 + 6 + 9)^2 = 256 \\ \vdots & \vdots \end{array}$$
From here, we already see that the sequence alternates for $n \geq 4$, so we have $$ n \geq 4 \implies f_n(11) = \begin{cases}169, & n \text{ is even} \\ 256, & n \text{ is odd}&\end{cases}$$
Therefore $f_{1988}(11) = 169$