A much simpler way to think of Bose–Einstein distribution function is to consider that n particles are denoted by identical balls and g shells are marked by g1 line partitions.
It is clear that the permutations of these n balls and g1 partitions will give different ways of arranging bosons in different energy levels.
Say, for 3(=n) particles and 3(=g) shells, therefore (g1)=2, the arrangement might be ●●●, or ●●●, or ●●● , etc.
Hence the number of distinct permutations of n + (g1) objects which have n identical items and (g1) identical items will be:
(n+g1)!/n!(g1)!
OR
The purpose of these notes is to clarify some aspects of the derivation of the Bose–Einstein (B–E)
distribution for beginners. The enumeration of cases (or ways) in the B–E distribution can be recast as
follows. Consider a game of dice throwing in which there are
$\backslash displaystyle\; n$ dice,
with each die taking values in the set
$\backslash displaystyle\; \backslash left\backslash \{\; 1,\; \backslash dots,\; g\; \backslash right\backslash \}$, for $g\; \backslash ge\; 1$.
The constraints of the game are that the value of a die
$\backslash displaystyle\; i$, denoted by $\backslash displaystyle\; m\_i$, has to be
greater than or equal to the value of die
$\backslash displaystyle\; (i1)$, denoted by
$\backslash displaystyle\; m\_\{i1\}$, in the previous throw, i.e.,
$m\_i\; \backslash ge\; m\_\{i1\}$. Thus a valid sequence of die throws can be described by an
ntuple
$\backslash displaystyle\; \backslash left(\; m\_1\; ,\; m\_2\; ,\; \backslash dots\; ,\; m\_n\; \backslash right)$, such that $m\_i\; \backslash ge\; m\_\{i1\}$. Let
$\backslash displaystyle\; S(n,g)$ denote the set of these valid ntuples:
$$
S(n,g) =
\Big\{
\left( m_1 , m_2 , \dots , m_n \right)
\Big \Big.
m_i \ge m_{i1} ,
m_i \in \left\{ 1, \dots, g \right\} ,
\forall i = 1, \dots , n
\Big\}.

(1)

Then the quantity $\backslash displaystyle\; w(n,g)$ (defined above as the number of ways to distribute
$\backslash displaystyle\; n$ particles among the
$\backslash displaystyle\; g$ sublevels of an energy level) is the cardinality of $\backslash displaystyle\; S(n,g)$, i.e., the number of elements (or valid ntuples) in $\backslash displaystyle\; S(n,g)$.
Thus the problem of finding an expression for
$\backslash displaystyle\; w(n,g)$
becomes the problem of counting the elements in $\backslash displaystyle\; S(n,g)$.
Example n = 4, g = 3:
 $$
S(4,3) =
\left\{
\underbrace{(1111), (1112), (1113)}_{(a)},
\underbrace{(1122), (1123), (1133)}_{(b)},
\underbrace{(1222), (1223), (1233), (1333)}_{(c)},
\right.
 $$
\left.
\underbrace{(2222), (2223), (2233), (2333), (3333)}_{(d)}
\right\}
 $\backslash displaystyle\; w(4,3)\; =\; 15$ (there are $\backslash displaystyle\; 15$ elements in $\backslash displaystyle\; S(4,3)$)
Subset
$\backslash displaystyle\; (a)$
is obtained by fixing all indices
$\backslash displaystyle\; m\_i$ to
$\backslash displaystyle\; 1$, except for the last index,
$\backslash displaystyle\; m\_n$, which is incremented from
$\backslash displaystyle\; 1$ to
$\backslash displaystyle\; g=3$.
Subset
$\backslash displaystyle\; (b)$
is obtained by fixing
$\backslash displaystyle\; m\_1\; =\; m\_2\; =\; 1$, and incrementing
$\backslash displaystyle\; m\_3$ from
$\backslash displaystyle\; 2$ to
$\backslash displaystyle\; g=3$. Due to the constraint
$$
\displaystyle
m_i \ge m_{i1}
on the indices in
$\backslash displaystyle\; S(n,g)$,
the index
$\backslash displaystyle\; m\_4$ must
automatically
take values in
$\backslash displaystyle\; \backslash left\backslash \{\; 2,\; 3\; \backslash right\backslash \}$.
The construction of subsets
$\backslash displaystyle\; (c)$ and
$\backslash displaystyle\; (d)$
follows in the same manner.
Each element of
$\backslash displaystyle\; S(4,3)$ can be thought of as a
multiset
of cardinality
$\backslash displaystyle\; n=4$;
the elements of such multiset are taken from the set
$\backslash displaystyle\; \backslash left\backslash \{\; 1,\; 2,\; 3\; \backslash right\backslash \}$
of cardinality
$\backslash displaystyle\; g=3$,
and the number of such multisets is the
multiset coefficient
 $$
\displaystyle
\left\langle
\begin{matrix}
3
\\
4
\end{matrix}
\right\rangle
= {3 + 4  1 \choose 31}
= {3 + 4  1 \choose 4}
=
\frac
{6!}
{4! 2!}
= 15
More generally, each element of
$\backslash displaystyle\; S(n,g)$
is a
multiset
of cardinality
$\backslash displaystyle\; n$
(number of dice)
with elements taken from the set
$\backslash displaystyle\; \backslash left\backslash \{\; 1,\; \backslash dots,\; g\; \backslash right\backslash \}$
of cardinality
$\backslash displaystyle\; g$
(number of possible values of each die),
and the number of such multisets, i.e.,
$\backslash displaystyle\; w(n,g)$
is the
multiset coefficient
$$
\displaystyle
w(n,g)
=
\left\langle
\begin{matrix}
g
\\
n
\end{matrix}
\right\rangle
= {g + n  1 \choose g1}
= {g + n  1 \choose n}
=
\frac{(g + n  1)!}
{n! (g1)!}

(2)

which is exactly the same as the
formula for $\backslash displaystyle\; w(n,g)$, as derived above with the aid
of
a theorem involving binomial coefficients, namely
$\backslash sum\_\{k=0\}^n\backslash frac\{(k+a)!\}\{k!a!\}=\backslash frac\{(n+a+1)!\}\{n!(a+1)!\}.$

(3)

To understand the decomposition
$$
\displaystyle
w(n,g)
=
\sum_{k=0}^{n}
w(nk, g1)
=
w(n, g1)
+
w(n1, g1)
+
\cdots
+
w(1, g1)
+
w(0, g1)

(4)

or for example,
$\backslash displaystyle\; n=4$
and
$\backslash displaystyle\; g=3$
 $$
\displaystyle
w(4,3)
=
w(4,2)
+
w(3,2)
+
w(2,2)
+
w(1,2)
+
w(0,2),
let us rearrange the elements of
$\backslash displaystyle\; S(4,3)$ as follows
 $$
S(4,3) =
\left\{
\underbrace{
(1111),
(1112),
(1122),
(1222),
(2222)
}_{(\alpha)},
\underbrace{
(111{\color{Red}\underset{=}{3}}),
(112{\color{Red}\underset{=}{3}}),
(122{\color{Red}\underset{=}{3}}),
(222{\color{Red}\underset{=}{3}})
}_{(\beta)},
\right.
 $$
\left.
\underbrace{
(11{\color{Red}\underset{==}{33}}),
(12{\color{Red}\underset{==}{33}}),
(22{\color{Red}\underset{==}{33}})
}_{(\gamma)},
\underbrace{
(1{\color{Red}\underset{===}{333}}),
(2{\color{Red}\underset{===}{333}})
}_{(\delta)}
\underbrace{
({\color{Red}\underset{====}{3333}})
}_{(\omega)}
\right\}.
Clearly, the subset
$\backslash displaystyle\; (\backslash alpha)$
of
$\backslash displaystyle\; S(4,3)$
is the same as the set
 $$
\displaystyle
S(4,2)
=
\left\{
(1111),
(1112),
(1122),
(1222),
(2222)
\right\}
.
By deleting the index
$\backslash displaystyle\; m\_4=3$
(shown in red with double underline)
in
the subset
$\backslash displaystyle\; (\backslash beta)$
of
$\backslash displaystyle\; S(4,3)$,
one obtains
the set
 $$
\displaystyle
S(3,2)
=
\left\{
(111),
(112),
(122),
(222)
\right\}
.
In other words, there is a onetoone correspondence between the subset
$\backslash displaystyle\; (\backslash beta)$
of
$\backslash displaystyle\; S(4,3)$
and the set
$\backslash displaystyle\; S(3,2)$. We write
 $$
\displaystyle
(\beta)
\longleftrightarrow
S(3,2)
.
Similarly, it is easy to see that
 $$
\displaystyle
(\gamma)
\longleftrightarrow
S(2,2)
=
\left\{
(11),
(12),
(22)
\right\}
 $$
\displaystyle
(\delta)
\longleftrightarrow
S(1,2)
=
\left\{
(1),
(2)
\right\}
 $$
\displaystyle
(\omega)
\longleftrightarrow
S(0,2)
=
\varnothing
(empty set).
Thus we can write
 $$
\displaystyle
S(4,3)
=
\bigcup_{k=0}^{4}
S(4k,2)
or more generally,
$$
\displaystyle
S(n,g)
=
\bigcup_{k=0}^{n}
S(nk,g1)
;

(5)

and since the sets
 $$
\displaystyle
S(i,g1) \ , \ {\rm for} \ i = 0, \dots , n
are nonintersecting, we thus have
$$
\displaystyle
w(n,g)
=
\sum_{k=0}^{n}
w(nk,g1)
,

(6)

with the convention that
 $$
\displaystyle
w(0,g)
=
1 \ , \forall g
\ ,
{\rm and}
\
w(n,0)
=
1 \ , \forall n
.

(7)

Continuing the process, we arrive at the following formula
 $$
\displaystyle
w(n,g)
=
\sum_{k_1=0}^{n}
\sum_{k_2=0}^{nk_1}
w(n  k_1  k_2, g2)
=
\sum_{k_1=0}^{n}
\sum_{k_2=0}^{nk_1}
\cdots
\sum_{k_g=0}^{n\sum_{j=1}^{g1} k_j}
w(n  \sum_{i=1}^{g} k_i, 0).
Using the convention (7)_{2} above, we obtain the formula
$$
\displaystyle
w(n,g)
=
\sum_{k_1=0}^{n}
\sum_{k_2=0}^{nk_1}
\cdots
\sum_{k_g=0}^{n\sum_{j=1}^{g1} k_j}
1,

(8)

keeping in mind that for
$\backslash displaystyle\; q$
and
$\backslash displaystyle\; p$
being constants, we have
$$
\displaystyle
\sum_{k=0}^{q}
p
=
q p
.

(9)

It can then be verified that (8) and (2) give the same result for
$\backslash displaystyle\; w(4,3)$,
$\backslash displaystyle\; w(3,3)$,
$\backslash displaystyle\; w(3,2)$, etc.
