Hi neyamv,

There is more than one way to interpret this problem. The beans could all have little ID numbers on them, which would result in there being very many ways to arrange them. Or the beans could all be indistinguishable, which is probably the problem's intent. Also, the bowls could be labeled or unlabeled. Also, it's not clear whether any of the three bowls is allowed to be empty.

Let's assume the beans are unlabeled and the bowls are labeled, and that each bowl must have at least one bean.

EDIT: Wow, I was working with another problem that had 100 instead of a million and got the numbers mixed up! However, the reasoning is still the same.. So, the following explanation is for 100 beans.

Then solutions are given by

(1,1,98)

(1,2,97)

...

(1,98,1)

(2,1,97)

...

(2,97,1)

...

(98,1,1)

If you followed what I wrote above, then you will have an idea of how to solve this problem. Say the beans are labeled A,B,C, and we fix A with 1 bean.

(1,1,98)

...

(1,98,1)

This gives 98 ways.

Then when we fix bowl A with 2 beans we get 97 ways.

Etc.

So the answer is