12. What is the sum of the digits of the integer which is equal to $6666666^{2}-3333333^{2}$ ?
A 27
B 36
C 45
D 54
E 63
SOLUTION
E
Using the standard factorization $x^{2}-y^{2}=(x-y)(x+y)$, we have
$$
\begin{aligned}
6666666^{2}-3333333^{2} & =(6666666-3333333)(6666666+3333333) \\
& =3333333 \times 9999999 \\
& =3333333 \times(10000000-1) \\
& =3333333 \times 10000000-3333333 \times 1 \\
& =33333330000000-3333333 \\
& =33333326666667
\end{aligned}
$$

It may be seen that the number 33333326666667 is written with six 3 s followed by one 2 , six $6 \mathrm{~s}$ and one 7. Therefore the sum of its digits is
$$
\begin{aligned}
(6 \times 3)+2+(6 \times 6)+7 & =18+2+36+7 \\
& =63
\end{aligned}
$$

FOR INVESTIGATION
12.1 Let $n=666666666^{2}-333333333^{2}$.
What is the sum of the digits of $n$ ?
12.2 (a) Let $a$ be the integer $\overbrace{666 \ldots 666}^{k}$ which in standard form is written as a string of $k 6 \mathrm{~s}$, $\overbrace{333}^{k}$ and let $b$ be the integer $\overbrace{333 \ldots 333}$ which is written as a string of $k 3 \mathrm{~s}$.
Find a formula, in terms of $k$, for the sum of the digits of the integer $a^{2}-b^{2}$.
(b) Find a formula for the sum of the digits of $c^{2}-d^{2}$ where $c=\overbrace{777 \ldots 777}^{k}$ and $d=\overbrace{222 \ldots 222}^{k}$.