Explanation:
we need the greatest or largest common factor (LCF) to find how many bags.
method prime factorization :
beginning with 2 we divide the number as often as possible by the current prime number until there is a remainder. then we use the next higher prime number and do the same.
when we reach 1 as final result, the process ends.
135 ÷ 2 not possible, going to 3
135 ÷ 3 = 45
45 ÷ 3 = 15
15 ÷ 3 = 5
5 ÷ 3 not possible, going to 5
5 ÷ 5 = 1 end
135 = 3×3×3×5
495 ÷ 2 not possible, going to 3
495 ÷ 3 = 165
165 ÷ 3 = 55
55 ÷ 3 not possible, going to 5
55 ÷ 5 = 11
11 ÷ 5 not possible, going to 7
11 ÷ 7 not possible, going to 11
11 ÷ 11 = 1 end
495 = 3×3×5×11
315 ÷ 2 not possible, going to 3
315 ÷ 3 = 105
105 ÷ 3 = 35
35 ÷ 3 = not possible, going to 5
35 ÷ 5 = 7
7 ÷ 5 not possible, going to 7
7 ÷ 7 = 1 end
315 = 3×3×5×7
the LCF is the longest sequence of prime factors the numbers have in common.
so, again, the numbers as prime factors in comparison :
135 = 3×3×3×5
495 = 3×3×5×11
315 = 3×3×5×7
they have in common
3×3 and 5
the LCF = 3×3×5 = 45
so, she can make max. 45 treat bags.
each bag will contain
135/45 = 3 pieces of candy A
495/45 = 11 pieces of candy B
315/45 = 7 pieces of candy C
you notice, how these numbers are exactly the remaining factors of the prime factoring ? it is not a coincidence ...
notice that 45 is the maximum number of treat bags.
following the prime factor combinations she could also create fewer treat bags (but with correspondingly more content).
she could create also
1 or
3 or
5 or
9 or
15
treat bags.