Talk:2021 AIME II Problems/Problem 1

Further Generalizations

More generally, for every positive integer $\boldsymbol{k,}$ the arithmetic mean of all the $\boldsymbol{(2k-1)}$-digit palindromes is \[\boldsymbol{\frac{10^{2k-1}+10^{2k-2}}{2}.}\] In this problem we have $k=2,$ from which the answer is $\frac{10^3+10^2}{2}=550.$

Note that all $(2k-1)$-digit palindromes are of the form \[\underline{D_1D_2D_3\ldots D_k\ldots D_3D_2D_1}=D_1\left(10^{2k-2}+1\right)+D_2\left(10^{2k-3}+10\right)+D_3\left(10^{2k-4}+10^2\right)+\cdots+D_k\left(10^{k-1}\right),\] where $D_1\in\{1,2,3,4,5,6,7,8,9\}$ and $D_2,D_3,\ldots,D_k\in\{0,1,2,3,4,5,6,7,8,9\}.$ Using this notation, we will prove the bolded claim in two different ways:

Proof 1 (Generalization of Solution 2)

The arithmetic mean of all values for $D_1$ is $5,$ and the arithmetic mean of all values for each of $D_2,D_3,\ldots,D_k$ is $4.5.$ Together, the arithmetic mean of all the $(2k-1)$-digit palindromes is \begin{align*} 5\left(10^{2k-2}+1\right)+4.5\left(10^{2k-3}+10\right)+4.5\left(10^{2k-4}+10^2\right)+\cdots+4.5\left(10^{k-1}\right)&=5\left(10^{2k-2}+1\right)+4.5\left(10+10^2+\cdots+10^{k-1}+\cdots+10^{2k-4}+10^{2k-3}\right) \\ &=5\left(10^{2k-2}+1\right)+4.5\left(\frac{10^{2k-2}-10}{9}\right) \\ &=5\left(10^{2k-2}+1\right)+\frac{10^{2k-2}-10}{2} \\ &=\frac{10\left(10^{2k-2}+1\right)}{2}+\frac{10^{2k-2}-10}{2} \\ &=\frac{10^{2k-1}+10}{2}+\frac{10^{2k-2}-10}{2} \\ &=\frac{10^{2k-1}+10^{2k-2}}{2}. \end{align*} ~MRENTHUSIASM

Proof 2 (Generalization of Solution 3)

Note that \[\underline{\left(10-D_1\right)\left(9-D_2\right)\left(9-D_3\right)\ldots \left(9-D_k\right)\ldots \left(9-D_3\right)\left(9-D_2\right)\left(10-D_1\right)}=\left(10-D_1\right)\left(10^{2k-2}+1\right)+\left(9-D_2\right)\left(10^{2k-3}+10\right)+\left(9-D_3\right)\left(10^{2k-4}+10^2\right)+\cdots+\left(9-D_k\right)\left(10^{k-1}\right),\] must be another palindrome by symmetry. Therefore, we can pair each $(2k-1)$-digit palindrome $\underline{D_1D_2D_3\ldots D_k\ldots D_3D_2D_1}$ uniquely with another $(2k-1)$-digit palindrome $\underline{\left(10-D_1\right)\left(9-D_2\right)\left(9-D_3\right)\ldots \left(9-D_k\right)\ldots \left(9-D_3\right)\left(9-D_2\right)\left(10-D_1\right)}$ so that they sum to \begin{align*} 10\left(10^{2k-2}+1\right)+9\left(10^{2k-3}+10\right)+9\left(10^{2k-4}+10^2\right)+\cdots+9\left(10^{k-1}\right)&=10\left(10^{2k-2}+1\right)+9\left(10+10^2+\cdots+10^{k-1}+\cdots+10^{2k-4}+10^{2k-3}\right) \\ &=10\left(10^{2k-2}+1\right)+9\left(\frac{10^{2k-2}-10}{9}\right) \\ &=10\left(10^{2k-2}+1\right)+\left(10^{2k-2}-10\right) \\ &=10^{2k-1}+10+10^{2k-2}-10 \\ &=10^{2k-1}+10^{2k-2}. \end{align*} From this symmetry, the arithmetic mean of all the $(2k-1)$-digit palindromes is $\frac{10^{2k-1}+10^{2k-2}}{2}.$

As a side note, the total number of $(2k-1)$-digit palindromes is $9\cdot10^{k-1}$ by the Multiplication Principle. Their sum is $\left(10^{2k-1}+10^{2k-2}\right)\cdot\frac{9\cdot10^{k-1}}{2}=\frac{9\cdot\left(10^{3k-2}+10^{3k-3}\right)}{2},$ as we can match them into $\frac{9\cdot10^{k-1}}{2}$ pairs such that each pair sums to $10^{2k-1}+10^{2k-2}.$

~MRENTHUSIASM