2026 AMC 10B Problem 20
Annie, Bobby, and Casey each receive an integer, not necessarily distinct, from through In how many ways can the numbers be given so that their sum is divisible by
Show solution without answering
Key insight
The numbers 1 through 7 have every remainder exactly once, so whenever one person's number comes from 1 to 7, exactly one choice makes the sum a multiple of 7.
Solution
Whether a sum is a multiple of depends only on the remainders of the numbers when divided by . So start by writing those remainders down.
| number | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| remainder |
Two things to notice:
- The "small" numbers through have every remainder exactly once.
- The "big" numbers repeat the remainders .
The key fact. Suppose two of the three numbers are already chosen, and the third must be a small number ( to ). Then exactly one choice works. For example, if two of the numbers are and , their sum has remainder , so the third number needs remainder . Among to only the number has remainder , and indeed .
Now split into three cases, by who has a big number.
- Casey's number is small ( to ). Annie and Bobby can have anything: ways. For each of these, exactly one small number for Casey works. That is ways.
- Casey's number is big, and Bobby's is small. Annie has choices and Casey has choices (, or ). For each of these ways, exactly one small number for Bobby works. That is ways.
- Casey's and Bobby's numbers are both big. There are only ways to pick these two, so check each one. Annie's number can be anything from to . She has choices if she needs remainder , or , and choice if she needs remainder , , or .
For example, if Bobby has and Casey has , their sum is , with remainder . Annie needs remainder , so she can have or : two choices. The table shows the number of choices for Annie in all nine cases.
| Casey | Casey | Casey | |
|---|---|---|---|
| Bobby | sum , Annie needs remainder : | sum , needs : | sum , needs : |
| Bobby | sum , needs : | sum , needs : | sum , needs : |
| Bobby | sum , needs : | sum , needs : | sum , needs : |
Adding the nine entries: ways.
4. Add the cases. Every way of giving out the numbers is in exactly one case (Casey small; Casey big and Bobby small; both big), so the total is
The answer is .
Why this works
A full run of numbers in a row contains each remainder once, so a number chosen from such a run can "fix" the sum in exactly one way. Peeling off the cases where somebody's number comes from to handles of the ways with no real work, and only the nine leftover cases need to be checked by hand. Use the same idea whenever the range is a little longer than a full set of remainders.
Alternative approach
Count by the actual sum. Three numbers from to add to at least and at most , so the sum must be , , or .
To count the ways three positive whole numbers add to , picture dots in a row and choose of the gaps to cut the row into three parts: ways. Then throw out any way that uses a number bigger than .
- Sum : ways. No number can be bigger than .
- Sum : ways, but some use an or a . If Annie has , the others add to ( ways); if she has , the others add to ( way). That is bad ways for Annie, and the same for Bobby and for Casey: bad ways. So .
- Sum : Replace each number by . This is still a number from to , and the new sum is . So the count is the same as for sum : , and none of these uses a number above .
- Sum : The same swap turns this into sum : ways.
The total is .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Among , the numbers to give each remainder on division by exactly once, and give remainders .
- Casey in to : for each of the choices for Annie and Bobby exactly one value works. ways.
- Casey in , Bobby in to : for each of the choices for Annie and Casey exactly one value for Bobby works. ways.
- Bobby and Casey both in : their sum has remainder in the nine cases, so Annie needs remainder , which she can get in ways. ways.
Total: .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Introduction to Number Theory, Chapter 10: Units Digits
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.