Determine
four distinct nonnegative integers A,
B,
C, and
D that satisfy this equation:
2A + 3B + 7C + 12D = 2021
*** For an extra challenge, solve this puzzle without using a computer program/excel solver assisted method.
1) Consider the equation mod 2
3^B is always odd, even if B = 0
7^C is always odd, even if C = 0
Therefore, 2^A + 12^D = 1 (mod 2)
Therefore A or D = 0
Therefore B and C are non-zero
2) Consider the equation mod 3
3^B = 0 mod 3
7^C = 1 mod 3
If D = 0 then 2^A + 0 + 1 + 1 = 2 (mod 3)
But this is impossible, so A = 0
The problem reduces to 3^B + 7^C + 12^D = 2020
where B, C and D are distinct and positive integers
3) Consider the equation mod 6
3^B + 1 + 0 = 4 (mod 6)
3^B = 3 (mod 6)
No help. This is true for all values of B
4) Similarly, mod 4 is no help
5) 7^4 = 2401, so C must equal 1, 2 or 3
12^4 is even bigger, so D must be 1, 2 or 3
6) Consider mod 9
3^B + 7^C + 3^D = 4 (mod 9)
3^B is 0 mod 9, unless B = 1, in which case it equals 3
7^C cycles through 7, 4, 1 mod 9
If B and D are not equal = 1, then 7^C = 4 mod 9, so C = 2
then D must equal 3 (because it is not 1)
3^B + 49 + 1728 = 2020
3^B = 243
B = 5
So 1 solution is (0, 5, 2, 3)
if B or D = 1, then 7^C = 1 mod 9, so C = 3
But (0, 1, 3, 2) does not work as a solution, so B is not 1
Trying D = 1, we get 3^B + 7^3 + 12 = 2020
3^B = 1665, which also does not work.
7) So the only solution is (0, 5, 2, 3)