5.4 #9,11,18,22,25,26a,49
5.5 #3,5,10,12,17
5.4 #18. Select 14 balls from 100 red, 100 blue, 100 green. We have to independently choose
such that it adds up to 14.(1 + x + x^2 + ... + x^100) (x^3 + x^3 + ... + x^10) (1 + x + x^2 + ... + x^100)
Multiply this out, and take the coefficient of x^14.
#22. (1 + x + x^2 + x^3 + ...)^n means we make n choices of natural numbers, and add them together. If we get 6 when we're done, then we added up n numbers and got 6, which stars & bars tells us can be done as (n+5 choose 5).
#26a. Let u = (x+x^2+x^3+x^4+x^5+x^6). Then 1/(1-u) = 1 + u + u^2 + u^3 + ...
The interpretation of u^k is that we're picking k numbers, in order, from 1..6, and adding them together. So the coefficient of x^n in u^k is the number of ways of breaking n into k numbers from 1..6.
Inside the sum 1 + u + u^2 + ..., we're doing it for all k. So the coefficient of x^n is the number of ways of breaking n up into 1..6.
5.5 #10.
Those not divisible by 5 or 7
= all - (those divisible by 5) - (those divisible by 7)
+ (those divisible by both)
= 100 - 100/5 - floor(100/7) + floor(100/35)
= 100 - 20 - 14 + 3 = 69.
#12. The squares or cubes = the squares + the cubes - both = floor(1000 ^ 1/2) + floor(1000 ^ 1/3) - floor(1000 ^ 1/6) = 31 + 10 - 3 = 38. ("Both" is the sixth powers.)