AMC 10 Step by Step

2026 AMC 10A Problem 23

P21-25~12 minPrint

In a list of one or more consecutive integers, there are pp multiples of 22 and qq multiples of 33. How many ordered pairs (p,q)(p, q) are possible for this list if pp and qq are between 00 and 100100, inclusive?

Log in to save your progress.
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 22 steps and multiples of 33 every 33 steps, so together they repeat every 66 steps. Build everything around blocks of 66.

Step 1: what a block of 6 contains.

  1. Any 66 consecutive integers contain exactly 33 even numbers and exactly 22 multiples of 33. For example, in 7,8,9,10,11,127, 8, 9, 10, 11, 12 the even numbers are 8,10,128, 10, 12 and the multiples of 33 are 9,129, 12. Starting somewhere else just shifts the pattern, so the counts stay 33 and 22.

2. Any list of consecutive integers can be cut into a short leftover piece of 00 to 55 numbers at the start, followed by mm full blocks of 66 (where mm can be 00). The blocks contribute 3m3m even numbers and 2m2m multiples of 33. So
(p,q)=(3m,2m)+(what the leftover piece contributes).(p, q) = (3m, 2m) + (\text{what the leftover piece contributes}).
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.

  1. Only the starting point within the pattern matters, so try leftover pieces starting at each of 1,2,3,4,5,61, 2, 3, 4, 5, 6. For each length, write down the pair (even numbers, multiples of 33). For example, the five numbers 4,5,6,7,84, 5, 6, 7, 8 contain the even numbers 4,6,84, 6, 8 and the single multiple of 33, namely 66, giving (3,1)(3, 1).
leftover lengthpossible (even, multiples of 3)
00(0,0)(0,0)
11(0,0)(0,0), (1,0)(1,0), (0,1)(0,1), (1,1)(1,1)
22(1,0)(1,0), (1,1)(1,1)
33(1,1)(1,1), (2,1)(2,1)
44(2,1)(2,1), (2,2)(2,2)
55(2,1)(2,1), (2,2)(2,2), (3,1)(3,1), (3,2)(3,2)
  1. Collect the different extras: (0,0)(0,0), (1,0)(1,0), (0,1)(0,1), (1,1)(1,1), (2,1)(2,1), (2,2)(2,2), (3,1)(3,1) and (3,2)(3,2). The last one adds exactly one more block's worth, so (3m,2m)+(3,2)(3m, 2m) + (3, 2) is the same as the (0,0)(0,0) extra with m+1m + 1 blocks. Nothing new there.

5. So for each m=0,1,2,…m = 0, 1, 2, \ldots we get a group of 77 possible pairs:
(3m,2m), (3m+1,2m), (3m,2m+1), (3m+1,2m+1), (3m+2,2m+1), (3m+2,2m+2), (3m+3,2m+1).(3m, 2m),\ (3m{+}1, 2m),\ (3m, 2m{+}1),\ (3m{+}1, 2m{+}1),\ (3m{+}2, 2m{+}1),\ (3m{+}2, 2m{+}2),\ (3m{+}3, 2m{+}1).
Every one of these really happens: use mm full blocks plus the right leftover piece. (For m=0m = 0 the pair (0,0)(0, 0) comes from a one-number list such as 11, since the list cannot be empty.) As a check, the pair (6,3)(6, 3) in group 11 comes from the 1111 numbers 4,5,…,144, 5, \ldots, 14: even numbers 4,6,8,10,12,144, 6, 8, 10, 12, 14 and multiples of 33 6,9,126, 9, 12.

Step 3: no pair is counted twice.

6. Give each pair a "fingerprint": the number 2p−3q2p - 3q. For a pair in group mm,
2(3m+x)−3(2m+y)=2x−3y,2(3m + x) - 3(2m + y) = 2x - 3y,
so the mm cancels and the fingerprint depends only on which of the seven patterns it is. The seven patterns have fingerprints 0,2,−3,−1,1,−2,30, 2, -3, -1, 1, -2, 3, all different.

  1. So two pairs from different patterns have different fingerprints, and two pairs from the same pattern but different groups have different values of pp. Every pair appears only once.

Step 4: count the pairs with pp and qq at most 100.

  1. In group mm the largest pp is 3m+33m + 3 and the largest qq is 2m+22m + 2, which is smaller. So pp is the one that runs into the cap.
  1. Groups m=0m = 0 to 3232. The largest pp is 3⋅32+3=993 \cdot 32 + 3 = 99 and the largest qq is 6666, so all 77 pairs fit. That gives 33×7=23133 \times 7 = 231 pairs.

10. Group 3333. Its pairs are
(99,66), (100,66), (99,67), (100,67), (101,67), (101,68), (102,67).(99, 66),\ (100, 66),\ (99, 67),\ (100, 67),\ (101, 67),\ (101, 68),\ (102, 67).
The first four fit; the last three have pp above 100100. That gives 44 pairs.

  1. Groups 3434 and up. Every pp is at least 3⋅34=1023 \cdot 34 = 102. Nothing fits.

The total is 231+4=235231 + 4 = 235.

The answer is (D) 235\boxed{\textbf{(D)}\ 235}.

Why this works

Divisibility by 22 and by 33 repeats every 66 numbers, so a long list behaves exactly like a short one plus some full blocks. That reduces an endless question to a table of 66 small cases. The fingerprint 2p−3q2p - 3q 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 11.

Alternative approach

Describe all possible pairs with one inequality, then count row by row.

  1. In a list of LL numbers, the number of even numbers is L2\frac{L}{2} rounded down or up, so 2p2p is within 11 of LL. The number of multiples of 33 is L3\frac{L}{3} rounded down or up, so 3q3q is within 22 of LL. Hence 2p2p and 3q3q differ by at most 33.
  1. The other direction also holds: every pair of whole numbers with 2p−3q2p - 3q between −3-3 and 33 appears. Each such fingerprint belongs to one of the seven patterns (x,y)(x, y) of step 5. Then 2(p−x)=3(q−y)2(p - x) = 3(q - y), so p−xp - x is a multiple of 33, say 3m3m, and q−y=2mq - y = 2m; checking the seven patterns shows that pp and qq being at least 00 forces m≥0m \ge 0. So (p,q)(p, q) is in group mm.

3. So count whole numbers p,qp, q from 00 to 100100 with 3q−3≤2p≤3q+33q - 3 \le 2p \le 3q + 3. For each qq, look at which pp fit:
- qq odd: 3q−33q - 3 and 3q+33q + 3 are even, so pp runs over 44 values. For example q=1q = 1 gives p=0,1,2,3p = 0, 1, 2, 3.
- qq even (not 00): pp runs over 33 values, for example q=2q = 2 gives p=2,3,4p = 2, 3, 4.
- q=0q = 0: pp can only be 00 or 11 (p=−1p = -1 is not allowed), so 22 values.
- q=67q = 67: pp could be 99,100,101,10299, 100, 101, 102, but only 9999 and 100100 are allowed, so 22 values.
- q=68q = 68 or more: pp would have to be at least 101101. None.

  1. From q=1q = 1 to 6666 there are 3333 odd values and 3333 even values, giving 33⋅4+33⋅3=23133 \cdot 4 + 33 \cdot 3 = 231. Adding the two ends: 2+231+2=2352 + 231 + 2 = 235.
Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Any 66 consecutive integers contain exactly 33 multiples of 22 and 22 multiples of 33. Write the length of the list as 6m+r6m + r with 0≤r≤50 \le r \le 5; then (p,q)=(3m,2m)+(x,y)(p, q) = (3m, 2m) + (x, y), where (x,y)(x, y) is the count for a run of rr consecutive integers, starting at any residue mod 66 (that is, at any point of the repeating pattern).

Running through the six starting points for each rr, the possible (x,y)(x, y) are
(0,0), (1,0), (0,1), (1,1), (2,1), (2,2), (3,1), (3,2),(0,0),\ (1,0),\ (0,1),\ (1,1),\ (2,1),\ (2,2),\ (3,1),\ (3,2),
and (3,2)(3,2) merely shifts mm by one. So the attainable pairs are exactly
(3m+x, 2m+y)with m≥0,(3m + x,\ 2m + y) \qquad \text{with } m \ge 0,
where (x,y)(x, y) is one of the seven pairs (0,0),(1,0),(0,1),(1,1),(2,1),(2,2),(3,1)(0,0), (1,0), (0,1), (1,1), (2,1), (2,2), (3,1), each realized by some list ((0,0)(0,0) by the list 11). These are all distinct, because 2p−3q=2x−3y2p - 3q = 2x - 3y takes the seven different values 0,2,−3,−1,1,−2,30, 2, -3, -1, 1, -2, 3 on the seven patterns.

The binding constraint is p≤100p \le 100. For 0≤m≤320 \le m \le 32 all seven pairs have p≤3m+3≤99p \le 3m + 3 \le 99 and q≤66q \le 66: 33⋅7=23133 \cdot 7 = 231 pairs. For m=33m = 33 only (99,66),(100,66),(99,67),(100,67)(99,66), (100,66), (99,67), (100,67) have p≤100p \le 100: 44 pairs. For m≥34m \ge 34, p≥102p \ge 102. The total is 231+4=235231 + 4 = 235.

The answer is (D) 235\boxed{\textbf{(D)}\ 235}.

Review in the AoPS books

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.