A string of
2001 digits begins with a "
6". Any number formed by two consecutive digits is divisible by either
17 or
23.
What is the last digit in this sequence?
What if the sequence had 2002 digits?
|
Submitted by levik
|
Rating: 4.3333 (6 votes)
|
|
Solution:
|
(Hide)
|
First write down all the two digit multiples of both numbers:
17: 17, 34, 51, 68, 85
23: 23, 46, 69, 92
Now, starting with a 6, there are two paths we can take (since 2 of the above numbers start with 6):
A: 6 8 5 1 7 - here we come to a dead end, since no two digit multiples of either 17 or 23 start with a 7
B: 6 9 2 3 4 6 - in this case, the 6th digit in the sequence is a 6 again, so we come back to the original problem.
It is obvious that we can repeat pattern B as many times as we need, and come back to a 6 every 5 digits. So a digit number n where n mod 5 = 1 will always be a 6, and since 2001 mod 5 = 1 the 2001st digit is a 6.
The 2002nd digit can be a 9, but can also be an 8, since we can branch into the dead end pattern A here because we have no need to continue the sequence further. |