Smallest $n$-digit number $x$ with cyclic permutations multiples of $1989$

159 Views Asked by At

Suppose $x=a_1...a_n$, where $a_1...a_n$ are the digits in decimal of $x$ and $x$ is a positive integer. We define $x_1=x$, $x_2=a_na_1...a_{n-1}$, and so on until $x_n=a_2...a_na_1$. Find the smallest $n$ such that each of $x_1,...,x_n$ are divisible by $1989$. Any zero digits are ignored when at the front of a number, e.g. $x_1 = 1240$ then $x_2 = 124$.

Defining $T_n = 11...(n 1's)$ and $S_n = \sum 10^{n-k}a_k $ it is clear to see that $1989k=T_nS_n$ is a necessary condition, which is useful for disproving small $n$.

But doing this I found $n \geq 6$, and the arithmetic becomes very difficult to do with pen and paper. I'm looking for a more algebraic way of solving this question. Can anyone help me?