prasanna_chandran wrote:Lets say bags are labelled as a1,a2, a3,.....a(nth).
Their Sum= 899, as number of sweets =899. Also a1=29, as given and every bag differs from previous bag by 29 sweets, so common difference is 29 and this is a AP with 1st term, 29 and CD=29.
899= 29+29*(n-1), where n is nth term.
so we have 870=29(n-1), or 30=n-1, and n=31.
Now, the series would conitue as, 29, 58, 87, 116, 145, 174.....870, 899. At 31st bag, we are left with 29 sweets, and same is filled in to leave no sweet left over for further bags if any.
Answer) 0
The solution is not correct. The problem states that you have 899 sweets that have to be put into bags and after the last bag 27 are left.
Let a be the 1st term, l the last term, d the difference and n be the number of terms. In this case, a = d = 29. So the last term l = a + (n – 1)d = a + an – a = an (as d = a).
So the sum is s = n(a + l)/2 = n(a + an)/2 = an(n + 1)/2 = 29n(n + 1)/2.
Now this sum must be < 899 and as close to it as possible. For n = 6, 7, 8, you get s = 609, 812 and 1044. Obviously 812 is closest. So there will be 7 bags and (899 – 812) = 27 sweets will be left out.