ok let me show you my way...
when I solve it in the class , I solve it in this way...
we have 5 students ... e1 , e2, ... e5
so we have
e1 + e2 + e3+ e4+ e5 = 8
ei is one one the student 1 =<ei =<5 and i>=1
g(x) = ( x + xpwr2 + .... + xpwr8)pwr5
= (x+( x pwr2)/2! + .... (x pwr8)/8!) pwr5
= ( ( e pwrx) -1) pwr5
= [e pwr(5x)] - [c(5,1) e pwr 4x] + ... -.... +[pc(5,4) e pwr x ]-1
= c(5,0) SEGMA 5 (x pwr 8) / 8! - c(5,1) SEGMA 4 (x pwr 4 )/4! +... -..... -1
= {SEGMA [ 5 pwr 8 - C(5,1) 4 pwr 8 + C(5,2) 3 pwr 8 - C(5,3) 2 pwr 8 + C(5,4) 1 pwr 8 ] x pwr8 / 8! }-1
A8 = 5 pwr8 - C(5,1) 4 pwr 8 + C(5,2) 3 pwr 8 - C(5,3) 2 pwr 8 + C(5,4) 1 pwr 8
count the answer, and once you have it , look at the last answer and devid it by 3! you will find that the resuts sound be the same.
as I told you ... the way that you solve it is more programming than what I did ( which is great , because you are a good programmer and you have a great future in that ) but you forgot that in the part III you need to select not to destribute ... and that is why you need to devid by 3!.
I hope that you understand my poor English.
Again. I would like to say ... that your way is a very computerizad way and ( I - should use it because I am a programmer - ) but you need to devid by 3! for the last part to get the right answer for your solution.
thanx again;)