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

More generally, we find:

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:

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\!.