The smallest positive integer $n$ for which $n(n+1)(n+2)$ is a multiple of 5 is $n=3$. All positive integers, $n$, for which $n(n+1)(n+2)$ is a multiple of 5 are listed in increasing order. What is the $2018^{\text {th }}$ integer in the list?
(A) 3362
(B) 3360
(C) 3363
(D) 3361
(E) 3364
Solution 1

In the table, we determine the value of the product $n(n+1)(n+2)$ for the first 10 positive integers:

| $n$ | $n(n+1)(n+2)$ |
| :---: | :---: |
| 1 | $1 \times 2 \times 3=6$ |
| 2 | $2 \times 3 \times 4=24$ |
| 3 | $3 \times 4 \times 5=60$ |
| 4 | $4 \times 5 \times 6=120$ |
| 5 | $5 \times 6 \times 7=210$ |
| 6 | $6 \times 7 \times 8=336$ |
| 7 | $7 \times 8 \times 9=504$ |
| 8 | $8 \times 9 \times 10=720$ |
| 9 | $9 \times 10 \times 11=990$ |
| 10 | $10 \times 11 \times 12=1320$ |

From the table, we see that $n(n+1)(n+2)$ is a multiple of 5 when $n=3,4,5,8,9,10$.

In general, because 5 is a prime number, the product $n(n+1)(n+2)$ is a multiple of 5 exactly when at least one of its factors $n, n+1, n+2$ is a multiple of 5 .

A positive integer is a multiple of 5 when its units (ones) digit is either 0 or 5 .

Next, we make a table that lists the units digits of $n+1$ and $n+2$ depending on the units digit of $n$ :

| Units digit of $n$ | Units digit of $n+1$ | Units digit of $n+2$ |
| :---: | :---: | :---: |
| 1 | 2 | 3 |
| 2 | 3 | 4 |
| 3 | 4 | 5 |
| 4 | 5 | 6 |
| 5 | 6 | 7 |
| 6 | 7 | 8 |
| 7 | 8 | 9 |
| 8 | 9 | 0 |
| 9 | 0 | 1 |
| 0 | 1 | 2 |

From the table, one of the three factors has a units digit of 0 or 5 exactly when the units digit of $n$ is one of $3,4,5,8,9,0$. (Notice that this agrees with the first table above.)

This means that 6 out of each block of 10 values of $n$ ending at a multiple of 10 give a value for $n(n+1)(n+2)$ that is a multiple of 5 .

We are asked for the $2018^{\text {th }}$ positive integer $n$ for which $n(n+1)(n+2)$ is a multiple of 5 .

Note that $2018=336 \times 6+2$.

This means that, in the first $336 \times 10=3360$ positive integers, there are $336 \times 6=2016$ integers $n$ for which $n(n+1)(n+2)$ is a multiple of 5 . (Six out of every ten integers have this property.) We need to count two more integers along the list.

The next two integers $n$ for which $n(n+1)(n+2)$ is a multiple of 5 will have units digits 3 and 4 , and so are 3363 and 3364.

This means that 3364 is the $2018^{\text {th }}$ integer with this property.

## Solution 2

In the table below, we determine the value of the product $n(n+1)(n+2)$ for the first 10 positive integers $n$.

| $n$ | $n(n+1)(n+2)$ |
| :---: | :---: |
| 1 | $1 \times 2 \times 3=6$ |
| 2 | $2 \times 3 \times 4=24$ |
| 3 | $3 \times 4 \times 5=60$ |
| 4 | $4 \times 5 \times 6=120$ |
| 5 | $5 \times 6 \times 7=210$ |
| 6 | $6 \times 7 \times 8=336$ |
| 7 | $7 \times 8 \times 9=504$ |
| 8 | $8 \times 9 \times 10=720$ |
| 9 | $9 \times 10 \times 11=990$ |
| 10 | $10 \times 11 \times 12=1320$ |

From the table, we see that the value of $n(n+1)(n+2)$ is not a multiple of 5 when $n=1$ or when $n=2$, but that $n(n+1)(n+2)$ is a multiple of 5 when $n=3,4,5$.

Similarly, we see that the value of $n(n+1)(n+2)$ is a not multiple of 5 when $n=6,7$, but that $n(n+1)(n+2)$ is a multiple of 5 when $n=8,9,10$.

That is, if we consider groups of 5 consecutive integers beginning at $n=1$, it appears that for the first 2 integers in the group, the value of $n(n+1)(n+2)$ is not a multiple of 5 , and for the last 3 integers in the group, the value of $n(n+1)(n+2)$ is a multiple of 5 .

Will this pattern continue?

Since 5 is a prime number, then for each value of $n(n+1)(n+2)$ that is a multiple of 5 , at least one of the factors $n, n+1$ or $n+2$ must be divisible by 5 .

(We also note that for each value of $n(n+1)(n+2)$ that is not a multiple of 5 , each of $n, n+1$ and $n+2$ is not divisible by 5 .)

For what values of $n$ is at least one of $n, n+1$ or $n+2$ divisible by 5 , and thus $n(n+1)(n+2)$ divisible by 5 ?

When $n$ is a multiple of 5 , then the value of $n(n+1)(n+2)$ is divisible by 5 .

When $n$ is one 1 less than a multiple of 5 , then $n+1$ is a multiple of 5 and and so $n(n+1)(n+2)$ is divisible by 5 .

Finally, when $n$ is 2 less than a multiple of 5 , then $n+2$ is a multiple of 5 and and so $n(n+1)(n+2)$ is divisible by 5 .

We also note that when $n$ is 3 less than a multiple of 5 , each of $n, n+1$ (which is 2 less than a multiple of 5), and $n+2$ (which is 1 less than a multiple of 5 ) is not divisible by 5 , and so $n(n+1)(n+2)$ is not divisible by 5 .

Similarly, when $n$ is 4 less than a multiple of 5 , then each of $n, n+1$ (which is 3 less than a multiple of 5), and $n+2$ (which is 2 less than a multiple of 5) is not divisible by 5 , and so $n(n+1)(n+2)$ is not divisible by 5 .

We have shown that the value of $n(n+1)(n+2)$ is a multiple of 5 when $n$ is: a multiple of 5 , or 1 less than a multiple of 5 , or 2 less than a multiple of 5 .

We have also shown that the value of $n(n+1)(n+2)$ is not a multiple of 5 when $n$ is: 3 less than a multiple of 5 , or 4 less than a multiple of 5 .

Since every positive integer is either a multiple of 5 , or $1,2,3$, or 4 less than a multiple of 5 , we have considered the value of $n(n+1)(n+2)$ for all positive integers $n$.

In the first group of 5 positive integers from 1 to 5 , there are exactly 3 integers $n(n=3,4,5)$ for which $n(n+1)(n+2)$ is a multiple of 5 .

Similarly, in the second group of 5 positive integers from 6 to 10 , there are exactly 3 integers $n$ $(n=8,9,10)$ for which $n(n+1)(n+2)$ is a multiple of 5 .

As was shown above, this pattern continues giving 3 values for $n$ for which $n(n+1)(n+2)$ is a multiple of 5 in each successive group of 5 consecutive integers.

When these positive integers, $n$, are listed in increasing order, we are required to find the $2018^{\text {th }}$ integer in the list.

Since $2018=3 \times 672+2$, then among the first 672 successive groups of 5 consecutive integers (which is the first $5 \times 672=3360$ positive integers), there are exactly $3 \times 672=2016$ integers $n$ for which $n(n+1)(n+2)$ is a multiple of 5 .

The next two integers, 3361 and 3362, do not give values for $n$ for which $n(n+1)(n+2)$ is a multiple of 5 (since 3361 is 4 less than a multiple of 5 and 3362 is 3 less than a multiple of 5). The next two integers, 3363 and 3364, do give values for $n$ for which $n(n+1)(n+2)$ is a multiple of 5 .

Therefore, the $2018^{\text {th }}$ integer in the list is 3364 .

ANSWER: (E)