When Claire divides her cupcakes into groups of 5, she has 3 remaining, and when she divides her cupcakes into groups of 7, she has 4 remaining. If Claire has fewer than 60 cupcakes, what is the sum of all possible quantities of cupcakes that she could have?
I need to find all the numbers that are 3 more than a multiple of 5 and 4 more than a multiple of 7, and are less than 60. I can write these numbers as 5k + 3 and 7m + 4, where k and m are positive integers. To find the common values of these expressions, I can use the Chinese remainder theorem, which says that there is a unique solution modulo 5 x 7 = 35. I can use a method of back-substitution to find this solution. I start by noticing that 5k + 3 = 4 mod 7, which means that 5k = 1 mod 7. To find k, I can try different values until I find one that works. For example, k = 3 gives 5 x 3 = 15 = 1 mod 7. So one solution is k = 3, which means that 5k + 3 = 18. This means that 18 is one of the possible quantities of cupcakes. To find the other solutions, I can add or subtract multiples of 35, since that is the modulus. However, I only want the positive solutions that are less than 60. So the only possible quantities of cupcakes are 18 and 53. To find the sum of these quantities, I just add them up: 18 + 53 = 71. 