106. Easy Division. By dividing the number 8101265822784 by 8, you will see that the answer can be obtained simply by moving the 8 from the beginning to the end of the number!

Could you find a number starting with 7 that can be divided by 7 in such a simple way?
106. Let's divide 7101449275362318840579 by 7 using the "corner" method, as we were taught in school. When dividing 7 by 7, we get 1, the next digit 1 gives 0 in the quotient, then again 1, and so on, until we reach the end. Checking the quotient against the dividend, we see that it indeed results from moving the first 7 of the dividend to the end. The quotient obtained by moving the first digit of the dividend to the end can be found for any divisor and any digit.

It is very interesting to investigate the problem in general.

Choosing the divisor as 2, we get the number \(2-10-52-6-31578-94-\) \(736-8-4-\)

The cycle then closes. The dashes indicate where there is no remainder when dividing by 2. Notice that immediately after the dashes come the digits \(1,5,6,3,9,7,8,4,2\). Therefore, if we need the number to start with 8, we take 842105 and so on, starting from the 8 after the dash. If there is a complete cycle, as in this case, and also for divisors equal to 3, 6, and 11, the number of digits in the desired number is equal to the divisor multiplied by 10 minus 2. If you take 4 as the divisor, you get five separate cycles. Thus, 4 -10256- gives you numbers starting with 4 or \(1 ; 20-512-8-\) - with 2,5 or \(8 ; 717948-\) with \(7 ; 3076-92-\) - with 3 or \(9 ; 615384\) - gives numbers starting with 6.

For some divisors, such as 5 and 9, although they generate several separate cycles, the same number of digits is required as if they generated one complete cycle. Our divisor 7 generates three cycles: one shown above and giving numbers whose first digit is 7, 1, or 4; the second - for numbers starting with 5, 8, or 2; the third - with 6, 9, or 3.