A basket holds 10 bananas, 8 apples, 6 oranges and 4 pears. Let $a_i$ be the number of different presents composed of $i$ fruits. Each such present contains at least 1 banana, at most 2 apples, the number of oranges in a present is even, and the number of pears in a present is odd. Create a generating function for ${\{{a_i\}}^\infty_{i=1}}$.
I'm not really sure how to approach this problem, I'd appreciate any guidance.