2. Determine the largest four-digit number $n$, for which the sum $n^{19}+99^{n}$ is divisible by ten.
2. The given sum is odd for even $n$. It is therefore divisible by ten only when $n$ is odd. For $n=2k+1$, the term $99^{n}=(100-1)^{2k+1}=10A-1$ gives a remainder of 9 when divided by ten, and thus the second term $n^{19}$ must give a remainder of 1 when divided by ten.

The decimal representation of the number $3^{19}=3 \cdot(10-1)^{9}=10B-3$ clearly ends in the digit 7, and therefore a number of the form $(10r \pm 3)^{19}$ cannot give a remainder of 1 when divided by ten. The same conclusion can be drawn for numbers of the form $(10r-1)^{19}$ and $(10r+5)^{19}$. Hence, $n$ can only be of the form $10r+1$, and the largest such four-digit number is 9991.

Another solution. For the numbers $n^{19}$ and $99^{n}$, we are only interested in their last digits. Since the last digit of any power $n^{k}$ depends only on the exponent $k$ and the last digit $c$ of the base $n$, we can construct a table of the last digits of powers $c^{k}$ for $c=0,1, \ldots, 9$:

| $k \quad c$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 2 | 0 | 1 | 4 | 9 | 6 | 5 | 6 | 9 | 4 | 1 |
| 3 | 0 | 1 | 8 | 7 | 4 | 5 | 6 | 3 | 2 | 9 |
| 4 | 0 | 1 | 6 | 1 | 6 | 5 | 6 | 1 | 6 | 1 |
| 5 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 6 | 0 | 1 | 4 | 9 | 6 | 5 | 6 | 9 | 4 | 1 |
| $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ |

From the column of the table for $c=9$, we see that the number $99^{n}$ ends in the digit 1 or 9 depending on whether $n$ is even or odd, so the number $n^{19}$ must end in the digit 9 or 1, respectively. From the table, we also see that the numbers $n^{k}$ and $n^{k+4}$ always end in the same digit. This is also true for the numbers $n^{19}$ and $n^{3}$. From the third row of the table $(k=3)$, however, we see that the number $n^{3}$ does not end in the digit 9 for any even $n$ (it ends in the digit 9 only for odd $n$ ending in the digit 9), whereas it ends in the digit 1 for exactly those odd $n$ ending in the digit 1. The largest such four-digit number is $n=9991$, which is the solution to the problem. Full solution is worth 6 points.