A finite sequence of three-digit integers has the property that the tens and units digits of each term are, respectively, the hundreds and tens digits of the next term, and the tens and units digits of the last term are, respectively, the hundreds and tens digits of the first term. For example, such a sequence might begin with the terms 247, 475, and 756 and end with the term 824. Let be the sum of all the terms in the sequence. What is the largest prime factor that always divides ?
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
The digits wrap around, so each digit appears once as a hundreds, once as a tens and once as a ones digit. The sum is 111 times the digit total.
Solution
Try a short example first: . Each term starts with the last two digits of the one before, and leads back to . So this sequence follows the rule.
- Look at the columns.
| hundreds | tens | ones | |
|---|---|---|---|
| 1 | 2 | 3 | |
| 2 | 3 | 1 | |
| 3 | 1 | 2 |
The hundreds column holds , and so do the tens and the ones columns, just shifted.
2. Why this always happens. Think of the digits written around a circle. Each term reads three digits in a row. As you move around, each digit is first a ones digit, then a tens digit in the next term, then a hundreds digit in the term after that. Because the list wraps around, this works even at the end.
3. So the sum splits nicely. Let be the total of the digits around the circle. The hundreds digits add to , the tens digits add to , and the ones digits add to . So
4. Factor . . So always divides .
5. Nothing bigger always works. For the sum is . The only choice bigger than is , and does not divide .
The answer is .
Why this works
The wrap-around rule means every digit gets used once in each place, so the sum is always times something. "Always divides" questions have two halves: show the number works for every sequence, then give one example where a bigger number fails. It helps to know on sight.
Alternative approach
Finish the example from the problem into a full loop: . The sum is . Among the choices, only and divide it, and is bigger. The column argument above then confirms that works every time.
The trap
Stopping at 3 because it clearly divides the sum, or picking 43 without checking an example where it fails.
Concise solution
Picture the terms as a ring of digits read cyclically: the -th term is (indices wrapping around). Each digit serves as the hundreds digit of one term, the tens digit of the previous term, and the units digit of the one before that.
So if is the total of the ring's digits, then
Thus always divides .
No larger prime is guaranteed: the sequence is valid and sums to , which is not divisible by (or by any prime above ).
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 2: Primes and Composites
- Introduction to Algebra, Chapter 22: Special Manipulations (§22.3)
- Introduction to Number Theory, Chapter 9: Base Number Arithmetic
Techniques
Test small/specific values or special cases to find or verify the answer · Exploit symmetry to reduce work or pair up objects