5. Find the largest three-digit number that is divisible by the sum of its digits and in which the first digit matches the third, but does not match the second.
Answer: 828.

Solution: Let this number be $\overline{a b a}=100 a+10 b+a$, where $a \neq b$. It must be divisible by $2 a+b$, so $101 a+10 b-10(2 a+b)=81 a$ is also divisible by $2 a+b$.

Since we need to find the largest such number, consider $a=9$. Then $81 a=729=3^{6}$, i.e., all divisors are powers of three, so $18+b=27$, from which $b=9$, which contradicts the condition $a \neq b$.

Now consider $a=8$. Then the number $81 a=648=2^{3} \cdot 3^{4}$ must be divisible by $16+b$ without a remainder, which is possible only when $b=2$ and $b=8$ (but the latter contradicts the condition $a \neq b$). Therefore, $a=8, b=2$.