[Algebra]
Problem: Let $T=$ 7, and let $K=9 T$. Let $A_{1}=2$, and for $n \geq 2$, let

$$
A_{n}= \begin{cases}A_{n-1}+1 & \text { if } n \text { is not a perfect square } \\ \sqrt{n} & \text { if } n \text { is a perfect square. }\end{cases}
$$

Compute $A_{K}$.

Solution: Let $\lfloor\sqrt{n}\rfloor=x$. Then $n$ can be written as $x^{2}+y$, where $y$ is an integer such that $0 \leq y<2 x+1$. Let $m$ be the greatest perfect square less than or equal to $9 T$. Then the definition of the sequence and the previous observation imply that $A_{K}=A_{9 T}=\sqrt{m}+(9 T-m)=\lfloor\sqrt{9 T}\rfloor+\left(9 T-\lfloor\sqrt{9 T}\rfloor^{2}\right)$. With $T=7, K=9 T=63$, $\lfloor\sqrt{9 T}\rfloor=7$, and the answer is therefore $7+\left(63-7^{2}\right)=\mathbf{2 1}$.

Final answer: 21