For each positive integer $n$, define $a_{n}$ and $b_{n}$ to be the positive integers such that

$$
(\sqrt{3}+\sqrt{2})^{2 n}=a_{n}+b_{n} \sqrt{6} \quad \text { and } \quad(\sqrt{3}-\sqrt{2})^{2 n}=a_{n}-b_{n} \sqrt{6}
$$

(a) Determine the values of $a_{2}$ and $b_{2}$.

(b) Prove that $2 a_{n}-1<(\sqrt{3}+\sqrt{2})^{2 n}<2 a_{n}$ for all positive integers $n$.

(c) Let $d_{n}$ be the ones (units) digit of the number $(\sqrt{3}+\sqrt{2})^{2 n}$ when it is written in decimal form. Determine, with justification, the value of

$$
d_{1}+d_{2}+d_{3}+\cdots+d_{1865}+d_{1866}+d_{1867}
$$

(The given sum has 1867 terms.)
(a) By definition $a_{2}+b_{2} \sqrt{6}=(\sqrt{3}+\sqrt{2})^{4}$.

Now

$$
(\sqrt{3}+\sqrt{2})^{2}=(\sqrt{3})^{2}+2(\sqrt{3})(\sqrt{2})+(\sqrt{2})^{2}=3+2 \sqrt{6}+2=5+2 \sqrt{6}
$$

and so

$$
(\sqrt{3}+\sqrt{2})^{4}=\left((\sqrt{3}+\sqrt{2})^{2}\right)^{2}=(5+2 \sqrt{6})^{2}=5^{2}+2(5)(2 \sqrt{6})+(2 \sqrt{6})^{2}=25+20 \sqrt{6}+24=49+20 \sqrt{6}
$$

Thus, $a_{2}+b_{2} \sqrt{6}=49+20 \sqrt{6}$ and so $a_{2}=49$ and $b_{2}=20$.

(It is true that there are no other integers $c, d$ for which $c+d \sqrt{6}=49+20 \sqrt{6}$. This follows from the fact that $\sqrt{6}$ is irrational.)
(b) Solution 1

Let $n$ be a positive integer.

Since $a_{n}+b_{n} \sqrt{6}=(\sqrt{3}+\sqrt{2})^{2 n}$ and $a_{n}-b_{n} \sqrt{6}=(\sqrt{3}-\sqrt{2})^{2 n}$, then adding these equations, we obtain

$$
\left(a_{n}+b_{n} \sqrt{6}\right)+\left(a_{n}-b_{n} \sqrt{6}\right)=(\sqrt{3}+\sqrt{2})^{2 n}+(\sqrt{3}-\sqrt{2})^{2 n}
$$

or

$$
2 a_{n}=(\sqrt{3}+\sqrt{2})^{2 n}+(\sqrt{3}-\sqrt{2})^{2 n}
$$

Now $\sqrt{3}-\sqrt{2} \approx 0.32$.

Since $01$.

Since $a_{n}>1$, then the following inequalities must successively be true:

$$
\begin{aligned}
& 2-2 a_{n}<0<1 \\
& -2 a_{n}+1<-1<0 \\
& \left(a_{n}\right)^{2}-2 a_{n}+1<\left(a_{n}\right)^{2}-1<\left(a_{n}\right)^{2} \\
& \left(a_{n}-1\right)^{2}<6\left(b_{n}\right)^{2}<\left(a_{n}\right)^{2} \\
& a_{n}-1<\sqrt{6} b_{n}<a_{n} \\
& 2 a_{n}-1<a_{n}+b_{n} \sqrt{6}<2 a_{n} \\
& 2 a_{n}-1<(\sqrt{3}+\sqrt{2})^{2 n}<2 a_{n}
\end{aligned}
$$

as required.
(c) Since $(\sqrt{3}+\sqrt{2})^{2}=a_{1}+b_{1} \sqrt{6}$, then $3+2 \sqrt{6}+2=a_{1}+b_{1} \sqrt{6}$ which gives $a_{1}+b_{1} \sqrt{6}=5+2 \sqrt{6}$ and so $a_{1}=5$ and $b_{1}=2$.

In (a), we determined that $a_{2}=49$ and $b_{2}=20$.

Using (b), we see that $2 a_{1}-1<(\sqrt{3}+\sqrt{2})^{2}<2 a_{1}$ or $9<(\sqrt{3}+\sqrt{2})^{2}<10$. This means that $(\sqrt{3}+\sqrt{2})^{2}$ is larger than 9 but smaller than 10 , and so its units digits is 9 . (A calculator can tell us that $(\sqrt{3}+\sqrt{2})^{2} \approx 9.899$.)

Similarly, $2 a_{2}-1<(\sqrt{3}+\sqrt{2})^{4}<2 a_{2}$ or $97<(\sqrt{3}+\sqrt{2})^{4}<98$. This means that $(\sqrt{3}+\sqrt{2})^{4}$ is between 97 and 98 , and so its units digit is 7 .

In general, because $2 a_{n}-1$ and $2 a_{n}$ are integers that satisfy $2 a_{n}-1<(\sqrt{3}+\sqrt{2})^{2 n}<2 a_{n}$, then $d_{n}$ (the units digit of $(\sqrt{3}+\sqrt{2})^{2 n}$ ) is the same as the units digit of $2 a_{n}-1$.

Now for every positive integer $k$,

$$
(\sqrt{3}+\sqrt{2})^{2(k+1)}=(\sqrt{3}+\sqrt{2})^{2 k}(\sqrt{3}+\sqrt{2})^{2}
$$

and so

$$
a_{k+1}+b_{k+1} \sqrt{6}=\left(a_{k}+b_{k} \sqrt{6}\right)(5+2 \sqrt{6})=\left(5 a_{k}+12 b_{k}\right)+\left(2 a_{k}+5 b_{k}\right) \sqrt{6}
$$

Since $a_{k+1}, b_{k+1}, a_{k}, b_{k}$ are all integers and $\sqrt{6}$ is irrational, then

$$
a_{k+1}=5 a_{k}+12 b_{k} \quad \text { and } \quad b_{k+1}=2 a_{k}+5 b_{k}
$$

Using these relationships, we can make a table of the first several values of $a_{n}, b_{n}, 2 a_{n}-1, d_{n}$ :

| $n$ | $a_{n}$ | $b_{n}$ | $2 a_{n}-1$ | $d_{n}$ |
| :---: | :---: | :---: | :---: | :---: |
| 1 | 5 | 2 | 9 | 9 |
| 2 | 49 | 20 | 97 | 7 |
| 3 | 485 | 198 | 969 | 9 |
| 4 | 4801 | 1960 | 9601 | 1 |
| 5 | 47525 | 19402 | 95049 | 9 |

(For example, we see that $a_{3}=5 a_{2}+12 b_{2}=5(49)+12(20)=245+240=485$ and $b_{3}=2 a_{2}+5 b_{2}=2(49)+5(20)=198$.)

For each $n$, we would like to determine the value of $d_{n}$, which is the units digit of $2 a_{n}-1$. Now the units digit of $2 a_{n}-1$ is completely determined by the units digit of $a_{n}$. Also, for each $n \geq 2$, $a_{n}=5 a_{n-1}+12 b_{n-1}$, so the units digit of $a_{n}$ is completely determined by the units digits of $a_{n-1}$ and $b_{n-1}$. In other words, it is sufficient to track the units digits of $a_{n}$ and $b_{n}$.

We reconstruct the previous table now, keeping only units digits:

| $n$ | Units digit of $a_{n}$ | Units digit of $b_{n}$ | Units digit of $2 a_{n}-1$ | $d_{n}$ |
| :---: | :---: | :---: | :---: | :---: |
| 1 | 5 | 2 | 9 | 9 |
| 2 | 9 | 0 | 7 | 7 |
| 3 | 5 | 8 | 9 | 9 |
| 4 | 1 | 0 | 1 | 1 |
| 5 | 5 | 2 | 9 | 9 |

Since the units digits of $a_{5}$ and $b_{5}$ are the same as the units digits of $a_{1}$ and $b_{1}$, and because each row in the table is completely determined by the previous row, then the units digits of $a_{n}$ and $b_{n}$ will repeat in a cycle of length 4 . (Since $a_{1}=a_{5}$ and $b_{1}=b_{5}$, and $a_{6}$ and $b_{6}$ are determined from $a_{5}$ and $b_{5}$ in exactly the same way as $a_{2}$ and $b_{2}$ were determined
from $a_{1}$ and $b_{1}$, then we must have $a_{6}=a_{2}$ and $b_{6}=b_{2}$. This argument continues to all subsequent terms.)

Since the units digits of $a_{n}$ repeat in a cycle of length 4 , then $d_{n}$ will repeat in a cycle of length 4.

Note that when we divide 1867 by 4, we obtain a quotient of 466 and a remainder of 3. Therefore,

$$
\begin{aligned}
d_{1}+d_{2}+d_{3}+\cdots+d_{1865}+d_{1866}+d_{1867} & =466\left(d_{1}+d_{2}+d_{3}+d_{4}\right)+\left(d_{1}+d_{2}+d_{3}\right) \\
& =466(9+7+9+1)+(9+7+9) \\
& =466(26)+25 \\
& =12141
\end{aligned}
$$

as required.