2026 AMC 10A Problem 23
In a list of one or more consecutive integers, there are multiples of and multiples of . How many ordered pairs are possible for this list if and are between and , inclusive?
Show solution without answering
Key insight
Every 6 consecutive integers hold exactly 3 even numbers and 2 multiples of 3, so only the leftover 0 to 5 numbers decide which pairs appear.
Solution
Even numbers come every steps and multiples of every steps, so together they repeat every steps. Build everything around blocks of .
Step 1: what a block of 6 contains.
- Any consecutive integers contain exactly even numbers and exactly multiples of . For example, in the even numbers are and the multiples of are . Starting somewhere else just shifts the pattern, so the counts stay and .
2. Any list of consecutive integers can be cut into a short leftover piece of to numbers at the start, followed by full blocks of (where can be ). The blocks contribute even numbers and multiples of . So
The list can start anywhere, so the leftover piece can start at any point of the repeating pattern.
Step 2: what the leftover piece can contribute.
- Only the starting point within the pattern matters, so try leftover pieces starting at each of . For each length, write down the pair (even numbers, multiples of ). For example, the five numbers contain the even numbers and the single multiple of , namely , giving .
| leftover length | possible (even, multiples of 3) |
|---|---|
| , , , | |
| , | |
| , | |
| , | |
| , , , |
- Collect the different extras: , , , , , , and . The last one adds exactly one more block's worth, so is the same as the extra with blocks. Nothing new there.
5. So for each we get a group of possible pairs:
Every one of these really happens: use full blocks plus the right leftover piece. (For the pair comes from a one-number list such as , since the list cannot be empty.) As a check, the pair in group comes from the numbers : even numbers and multiples of .
Step 3: no pair is counted twice.
6. Give each pair a "fingerprint": the number . For a pair in group ,
so the cancels and the fingerprint depends only on which of the seven patterns it is. The seven patterns have fingerprints , all different.
- So two pairs from different patterns have different fingerprints, and two pairs from the same pattern but different groups have different values of . Every pair appears only once.
Step 4: count the pairs with and at most 100.
- In group the largest is and the largest is , which is smaller. So is the one that runs into the cap.
- Groups to . The largest is and the largest is , so all pairs fit. That gives pairs.
10. Group . Its pairs are
The first four fit; the last three have above . That gives pairs.
- Groups and up. Every is at least . Nothing fits.
The total is .
The answer is .
Why this works
Divisibility by and by repeats every numbers, so a long list behaves exactly like a short one plus some full blocks. That reduces an endless question to a table of small cases. The fingerprint measures how far the two counts are from being perfectly in step, and it is what keeps the listing honest. In problems like this, spend most of your care on the edge of the range: here the answer choices differ by .
Alternative approach
Describe all possible pairs with one inequality, then count row by row.
- In a list of numbers, the number of even numbers is rounded down or up, so is within of . The number of multiples of is rounded down or up, so is within of . Hence and differ by at most .
- The other direction also holds: every pair of whole numbers with between and appears. Each such fingerprint belongs to one of the seven patterns of step 5. Then , so is a multiple of , say , and ; checking the seven patterns shows that and being at least forces . So is in group .
3. So count whole numbers from to with . For each , look at which fit:
- odd: and are even, so runs over values. For example gives .
- even (not ): runs over values, for example gives .
- : can only be or ( is not allowed), so values.
- : could be , but only and are allowed, so values.
- or more: would have to be at least . None.
- From to there are odd values and even values, giving . Adding the two ends: .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Any consecutive integers contain exactly multiples of and multiples of . Write the length of the list as with ; then , where is the count for a run of consecutive integers, starting at any residue mod (that is, at any point of the repeating pattern).
Running through the six starting points for each , the possible are
and merely shifts by one. So the attainable pairs are exactly
where is one of the seven pairs , each realized by some list ( by the list ). These are all distinct, because takes the seven different values on the seven patterns.
The binding constraint is . For all seven pairs have and : pairs. For only have : pairs. For , . The total is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.