Consider the following operation. Given a positive integer , if is a multiple of , then you replace by . If is not a multiple of , then you replace by . For example, beginning with , this procedure gives . Suppose you start with . What value results if you perform this operation exactly times?
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
Iterate: 100→110→120→40→50→60→20→30→10→20→…; from step 6 the values cycle 20, 30, 10 with period 3, and step 100 ≡ step 7 gives 30.
Solution
Apply the rule and record the result after each step:
| step | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| value | 110 | 120 | 40 | 50 | 60 | 20 | 30 | 10 | 20 | 30 | 10 |
From step on the values repeat with period : step (multiples of ) give ; steps give ; steps give .
Since is one more than a multiple of (like step ), the value after operations is .
The answer is .
Why this works
A deterministic rule on a finite set of reachable values must eventually cycle; once a value repeats, everything after it is periodic. Compute until the first repeat, note where the cycle starts and its length, then reduce the target step number modulo the period, taking care to align with a known step inside the cycle.
The trap
Off-by-one when aligning the cycle: step 6 is 20, so steps 7, 10, 13, … (one more than a multiple of 3) are 30.
Common mistakes
- Off-by-one when aligning the cycle: step 6 is 20, so steps 7, 10, 13, … (one more than a multiple of 3) are 30.
- Assuming the cycle starts at step and reducing against the wrong anchor.
Techniques
Compute small cases, spot the pattern, generalize