In many math contests, the hardest problems are often ones that involve combinatorics, specifically advanced casework. These problems require a mixture of insight and practice. So, let’s work through one.
A 4-digit number ABCD has these four properties:
A = D
B is the smallest digit in the number
C is halfway between B and D
How many numbers can be constructed that satisfy these criteria? An example of a number that satisfies this is 7357.
When given a problem like this, the best first step is usually to try some examples. Let’s say that A and D are 1. This means that B must be 0. But there is no digit between 0 and 1, so this is not possible.
Next, let’s set A and D equal to 2. This means that B can either be 0 or 1. If B is 0, C must be 1, as there is only one digit in between 0 and 2, which is 1. B cannot be 1, since there are no options for C.
Now, let’s look at another case. Let’s set A and D equal to 3. B must be equal to either 0, 1, or 2. The only option for B is 1, since that is the only one which will result in an integer for C, which is 2. Feel free to try the other options for B too.
Finally, let’s look at what happens when we set A and D equal to 4. Instead of previously, there are now 2 ways to satisfy B and C. One of them is setting B to 0, which will result in C being 2. Another one is setting B to 2, which results in C being equal to 3.
Let’s look at why this happens. To get an integer number that is the average of two other numbers, the difference between the two numbers has to be an even number. This is because the central number must be equal parts above and below the smaller and greater number, respectively. This results in a number that is 2 times the difference between the average and the other numbers.
Since the difference between D and B is divisible by two, let’s look at the possibilities for C. We notice that for every pair of D and B that results in a difference divisible by 2, there is only one option for C. This is easy to notice, as there is only one average for every two numbers. So, this problem transforms into finding the number of ways we can get an even difference between D and B. To do this, we begin out casework.
Case 1: D = 0: 0 possibilities
Case 2: D = 1: 0 possibilities
Case 3: D = 2: 1 possibility (D = 2, B = 0)
Case 4: D = 3: 1 possibility (D = 3, B = 1)
Case 5: D = 4: 2 possibilities (D = 4, B = 0), (D = 4, B = 2)
Case 6: D = 5: 2 possibilities (D = 5, B = 1), (D = 5, B = 3)
Case 7: D = 6: 3 possibilities (D = 6, B = 0), (D = 6, B = 2), (D = 6, B = 4)
…
There are more cases (3 to be exact), but I did not list them because I did not need to. We found a pattern from the cases, so we can solve the problem. The number of possibilities for a case is the floor of D divided by 2. (The floor of a number is basically just the integer part, so the floor of 2.5 is 2). Try to see if you can figure out why this is the case.
From this, we can find the answer. The answer will be 0 + 0 + 1 + 1 + 2 + 2 + 3 + 3 + 4 + 4. You should know that 1 + 2 + 3 + 4 is 10, since this comes up very often in contest math problems. So, the answer is 10 + 10, which is 20.
This problem was hard. It required deep intuition, casework, and a little more intuition. Problems like this will likely be near the end of your test, so attempt them only if you have time.
