Having 20 distinct balls and 4 distinct baskets, i can put 3 to 9 balls to those baskets(each basket) that is my limitation, so i thought solving this using generating functions, so i applied an exponential function since they are distinct which is $$(\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\frac{x^6}{6!}+\frac{x^7}{7!}+\frac{x^8}{8!}+\frac{x^9}{9!})^4$$
Then I had to find the coeficient of $\frac {x^{20}}{20!}$ Everything correct so far?
So here my real problem begins: Each basket have specific positions, each ball now takes a number (I envision it like some separate ticket) and its ball 'sits' in successive positions starting from the 1st one position/place.
So if I understood correctly the second problem is like the 1st but they are permutations now so my function becomes(?):
$$(\frac{3!x^3}{3!}+\frac{4!x^4}{4!}+\frac{5!x^5}{5!}+\frac{6!x^6}{6!}+\frac{7!x^7}{7!}+\frac{8!x^8}{8!}+\frac{9!x^9}{9!})^4$$
because if order matters, and I choose ie $4$ then those $4$ have $4!$ to be placed.Coefficient for this one is $\frac{20!x^{20}}{20!}$