I apologize for the simplicity of this question, if necessary.
I understand that the sum of all 4-digit palindromes is as follows: $$\sum_{a=1}^{9}(\sum_{b=0}^{9}abba),$$ which can be further expanded upon such that:
\begin{equation}
\begin{aligned}
\sum_{a=1}^{9}(\sum_{b=0}^{9}abba) &= \sum_{a=1}^{9}\sum_{b=0}^{9}(1001a + 110b) \\
&= \sum_{a=1}^{9}[10(1001a) + 110\sum_{b=0}^{9}b].
\end{aligned}
\end{equation}
The last line of the equation is what's confusing me. Where does the $10$ come from in $10(1001a)$?
I don't use double summation notation often, so I assume it has to do with moving the summation of $b$ inside the equation to make the triangular number formula more apparent, but WHY do we need the $10$?
Thank you for any help.
The $10$ comes from summing over $b$ from $0$ to $9$. That is, $$\sum_{b=0}^9 1001 a = 10 (1001 a)$$ so $$ \sum_{a=1}^9 \sum_{b=0}^9 1001 a = \sum_{a=1}^9 10 (1001 a)$$