Question: Find the coefficient of [itex]x^5[/itex] in [itex](1+x+x^2)^4[/itex]. Problem: I have not come across expanding brackets which have [itex]x^2[/itex]. I know how to apply the binomial theorem for [itex](a+b)^n[/itex] or [itex](1+a)^n[/itex] but have not come across [itex](1 + ax + ax^2)^n[/itex]. They are not explained in my textbooks so I was wondering if you could provide hints or redirect me to a useful link. Thanks.