Explanation:
For each type of fruit, the corresponding generating function will be:
For apples the generating function will be:
For banana the generating function will be:
For orange the generating function will be:

For pears the generating function will be :
Then the generating function is the product of the factors:

Therefore, we get
From the given question data,

CONCLUSION:
For h_{n} the value n=30 is the answer.