+0

# help

0
183
2

Sally has a bagful of candy. She arranges it into an a by b grid, but she has 2a+b candies leftover. Her big sister Rita comes along and says, "I can do better than that!" Rita neatly arranges the candies into a 5a-4 by $$\frac{b-1}{3}$$ grid and has none leftover. What is the maximum number of candies in Sally's bag?

Jan 13, 2019

#1
+533
+1

the number of condies she has is ab+2a+b or also (5ab-5a-4b+4)/3. settings these equal you get 3ab+6a+3b=5ab-5a-4b+4 => 2ab-11a-7b+4=0.

using simon's favorite factoring trick, it becomes 2a(b-11/2)-7(b-11/2)=77/2 - 4

so (2a-7)(b-11/2)=69/2

doubling both sides you get (2a - 7)(2b - 11) = 69, and the factors of 69 are 1, 3, 23, and 69, which correspond to the pairs of a and b as (4, 40), (5, 17), (15, 7), and (38, 6). the values of the candies in her bag can be 208 or 142, because some cases will not work because of the (b-1)/3.

HOPE THIS HELPED!

Jan 13, 2019
#2
+103049
0

Very nice, asdf......I like that factoring "trick"

CPhill  Jan 13, 2019