How many ways are there to write as the sum of twos and threes, ignoring order? (For example, and are two such ways.)
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
In 2a + 3b = 2016 the number of threes must be even, so b = 2k with 0 <= k <= 336, giving 337 solutions.
Solution
A way to write is a pair of nonnegative integers with
where is the number of twos and the number of threes.
Since and are even, must be even, so is even. Write . Then , i.e. . This is a nonnegative integer exactly when .
Each in that range gives one valid pair, so the number of ways is .
The answer is .
Why this works
For a two-variable linear equation, once one variable is pinned to a residue class (here, even), the solutions form an arithmetic progression, and counting them is just counting the terms of that progression within the allowed bounds. Parity is the fastest way to find the residue condition; the example in the problem ( threes) is a hint that is even.
Alternative approach
Count values of directly: ranges over even numbers from to (since means ). Even numbers from to inclusive: .
The trap
Forgetting the solution with zero threes (or zero twos) and answering 336.
Common mistakes
- Forgetting the solution with zero threes (or zero twos) and answering 336.
- Counting all from to without the parity restriction, giving , or counting only values without noticing they must be multiples of apart.
Techniques
Set up the equation/formula and compute; no special trick needed · Use an invariant, parity, or coloring argument