## String Of Ones

#### Problem

A number consisting entirely of the digit one is called a repunit; for example, 11111.

Find the smallest repunit that is divisible by 63.

#### Solution

As 63 = 7 9, the repunit we are seeking must be divisible by both 7 and 9. A number is divisible by 9 if and only if the sum of the digits is a multiple of 9, therefore 111111111 is the smallest repunit that divides by 9.

By systematically working through increasing length repunits we can see that the 6-digit number, 111111, is the smallest repunit that divides by 7; that is, 111111/7 = 15873.

As 7 divides into a block of six ones, it must divide into any repunit that contains a multiple of six ones. Simiarly 9 will divide into any repunit containing a multiple of nine ones.

The lowest common multiple of six and nine is eighteen. Hence the smallest repunit that divides by 63 contains exactly eighteen digits.

Find the smallest repunit that divides by 1353.