0.5 * (x^2+x)
where x= number of bags;
so for 20 bags and u need the total different number of eggs it will be
0.5 * ((20) ^ 2 + 20) = 210 eggs
"not considering the strange assumption of a zero egg bag!! , so bag 1 will have one egg and bag two will have 2 eggs and so on"
i used calculus to derive it , it's cool :)
More information about formatting options