MathDB
Ireland Olympiad number theory

Source: IrMO 1989 Paper 1 Q.5

January 5, 2016
Divisibilitynumber theory

Problem Statement

Let x=a1a2anx = a_1a_2 \dots a_n be an n-digit number, where a1,a2,,an(a10)a_1, a_2, \dots , an (a_1 \neq 0) are the digits. The nn numbers x1=x=a1a2...an, x_1 = x = a_1 a_2 ... a_n, x2=ana1...an1, x_2 = a_n a_1 ... a_{n-1}, x3=an1ana1...an2 x_3 = a_{n-1} a_n a _1 ... a_{n-2} , x4=an2an1ana1,...an3, x_4 = a_{n-2} a_{n-1} a_n a_1 , ... a_{n-3} , ...,xn=a2a3...ana1 ... , x_n = a_2 a_3 ... a_n a_1 are said to be obtained from xx by the cyclic permutation of digits. [For example, if n=5n = 5 and x=37001x = 37001, then the numbers are x1=37001,x2=13700,x_1 = 37001, x_2 = 13700, x3=01370(=1370),x4=00137(=137),x_3 = 01370(= 1370), x_4 = 00137(= 137), x5=70013.] x_5 = 70013.] Find, with proof, (i) the smallest natural number n for which there exists an n-digit number x such that the n numbers obtained from x by the cyclic permutation of digits are all divisible by 1989; and (ii) the smallest natural number x with this property.