[Number Theory]
Problem: Let $T=7$. Let $A$ and $B$ be distinct digits in base $T$, and let $N$ be the largest number of the form $\underline{A} \underline{B} \underline{A}_{T}$. Compute the value of $N$ in base 10 .

Solution: To maximize $\underline{A} \underline{B} \underline{A}_{T}$ with $A \neq B$, let $A=T-1$ and $B=T-2$. Then $\underline{A} \underline{B}^{A} \underline{A}_{T}=$ $(T-1) \cdot T^{2}+(T-2) \cdot T^{1}+(T-1) \cdot T^{0}=T^{3}-T-1$. With $T=7$, the answer is 335 .

Final answer: 335