How many of the first numbers in the sequence are divisible by ?
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
The terms are 1 followed by zeros and a 1. Every fourth term, starting with 101 itself, is a multiple of 101, so count 1st, 5th, 9th, and so on.
Solution
Start by testing the first few terms to find a pattern.
1. Test small cases.
- : yes.
- : no.
- : no.
- : no.
- : yes.
So the st and th terms work. It looks like every fourth term works.
2. Why every fourth? Write the terms as , so the first term has (since ). Look at what is compared to multiples of :
- is less than .
- So is more than a multiple of (because ).
- So is times (a multiple of , plus ), which is plus a multiple of . Adding a multiple of does not change whether a number is a multiple of .
So " is a multiple of " repeats every steps of . It is true for and false for , as the tests showed.
3. Count. The terms that work are term numbers , each one more than a multiple of . The last such number up to is . The list has
numbers.
The answer is .
Why this works
Whether a power of plus is a multiple of a fixed number depends only on the remainder, and remainders of powers repeat in a cycle. Here is one less than , which makes the cycle length . Once you know the cycle, the problem is counting terms in a list that skips by , and you must be careful at both ends.
Alternative approach
With congruences: , which says leaves remainder (one short of a multiple). Then is a multiple of exactly when , which happens for . The terms use up to , so the good values are , and there are of them.
The trap
Thinking every other term works (1009, choice E), or being off by one at the end and answering 504.
Concise solution
The -th term is , so the first terms are for .
Work modulo . Since , the powers of cycle with period :
We need , which happens exactly when .
Count the exponents with : they are , an arithmetic progression with common difference , so there are
of them.
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
- Introduction to Number Theory, Chapter 10: Units Digits
Techniques
Compute small cases, spot the pattern, generalize