1. The number $a_{n}$ is formed by writing down the first $n$ squares of consecutive natural numbers in sequence. For example, $a_{11}=149162536496481100$ 121. Determine how many numbers divisible by twelve are among the numbers $a_{1}, a_{2}, \ldots, a_{100000}$.
1. As we know, every natural number $k$ gives the same remainder when divided by three as the number $S(k)$ equal to the sum of the digits of the original number $k$. The number $a_{n}$, therefore, gives the same remainder when divided by three as the sum $S\left(1^{2}\right)+S\left(2^{2}\right)+\ldots+S\left(n^{2}\right)$, and thus also as the sum $1^{2}+2^{2}+\ldots+n^{2}$. In two ways, we will show that the last sum is divisible by three if and only if the number $n$ is of the form $9k-5$, $9k-1$, or $9k$, where $k$ is a natural number.

In the first method, we use the known formula

$$
1^{2}+2^{2}+\ldots+n^{2}=\frac{n(n+1)(2n+1)}{6}
$$

from which it follows that the examined sum is divisible by three if and only if the product $n(n+1)(2n+1)$ is divisible by nine. Since the numbers $n$, $n+1$, and $2n+1$ are pairwise coprime, we are looking for those $n$ for which one of the numbers $n$, $n+1$, or $2n+1$ is divisible by nine, and these are the numbers of the form $9k$, $9k-1$, or $9k-5$.

The second method is based on the observation that the remainders of the numbers $1^{2}, 2^{2}, 3^{2}, 4^{2}, 5^{2}, \ldots$ when divided by three are $1,1,0,1,1,0, \ldots$, i.e., they repeat with a period of 3. Indeed, the numbers $(k+3)^{2}$ and $k^{2}$ give the same remainder when divided by three, because their difference is the number $3(2k+3)$, which is a multiple of three. By summing the mentioned remainders, we get the remainders of the first nine sums (1): 1, $2,2,0,1,1,2,0,0$; then the remainders of the subsequent sums (1) begin to repeat periodically. (This follows from the fact that the previous sum of nine numbers gives a zero remainder and at the same time the number of addends is a multiple of the period 3 of the added remainders.)

We already know which numbers $a_{n}$ are divisible by three; we will now address the easier question of which $a_{n}$ are divisible by four. Let us show that these are all $a_{n}$ with even $n>2$ (and no others). The number $a_{n}$ with odd $n$ is odd, the number $a_{2}$ equals 14, and the number $a_{n}$ with even $n>2$ ends with the same two-digit number as the number $n^{2}$, so such an $a_{n}$ (like the mentioned two-digit number) is divisible by four.

Combining the results on divisibility by three and four, we conclude that the number $a_{n}$ is divisible by twelve if and only if the number $n$ is of one of the forms $18k-14$, $18k-10$, or $18k$, where $k$ is any natural number. Since $100000=5556 \times 18-8$, there are exactly 5556 numbers of the form $18k-14$, 5556 numbers of the form $18k-10$, and 5555 numbers of the form $18k$ among the natural numbers from 1 to 100000, totaling 16667 numbers.

For a complete solution, award 6 points, of which 4 points and 1 point for solving the question of which $n$ the number $a_{n}$ is divisible by three and four, respectively.