# 2018_Question_2 Let the digits of an n\!-ring be \{x_1,x_2,\cdots,x_n\}\!.

\begin{align} x_1x_2x_3&=x_2x_3x_4\\ x_1&=x_4 \end{align}

More generally, we find:

\begin{align} x_ix_{i+1}x_{i+2}&=x_{i+1}x_{i+2}x_{i+3}\\ x_i&=x_{i+3} \end{align}

wrapping around where necessary (e.g. x_{n+2}=x_2\!).

Now if n is a multiple of 3\!, we can trivially see that the following is a valid n ring:

\begin{alignat}{3} x_1&=x_4=\cdots=x_{3k+1}&&=n\\ x_2&=x_5=\cdots=x_{3k+2}&&=1\\ x_3&=x_6=\cdots=x_{3k}&&=1\\ \end{alignat}

If n is not a multiple of 3\!, we find that repeatedly applying x_i=x_{i+3} and wrapping around, gives all x_i are equal, so x_i=a\!. This means that a^3=n\!, so n needs to be a perfect cube for a to be an integer. Therefore, it is possible to form an n\!-ring if n is a multiple of 3 or a cube.

Since 2018=3\times672+2\!, there are 672 values of n that are multiples of 3\!. Now, we just need to count the cubes in the interval [3,2018] which aren’t divisible by 3\!, of which there are 7\!: 2^3,4^3,5^3,7^3,8^3,10^3,11^3\!. In total, it is possible to form an n\!-ring for 679 values of n\!.

1 Like   1 Like