Are you asking how you get this forumla?
Suppose that independent trials, each resulting in one of possible outcomes with respective probabilities are performed. Then
.
I don't get the following: is chosen by a uniform distribution of the form: leading to the Bose-Einstein distribution .