The distributions
P
(
M
L
,
M
S
)
of the total magnetic quantum numbers ML
and MS
for N electrons of angular momentum
ℓ
, as well as the enumeration of LS spectroscopic terms and spectral lines, are crucial for the calculation of atomic structure and spectra, in particular for the modeling of emission or absorption properties of hot plasmas. However, no explicit formula for
P
(
M
L
,
M
S
)
is known yet. In the present work, we show that the generating function for the cumulants, which characterize the distribution, obeys a recurrence relation, similar to the Newton–Girard identities relating elementary symmetric polynomials to power sums. This enables us to provide an explicit formula for the generating function. We also analyze the possibility of representing the
P
(
M
L
,
M
S
)
distribution by a bi-variate Gram–Charlier series, which coefficients are obtained from the knowledge of the exact moments of
P
(
M
L
,
M
S
)
. It is shown that a simple approximation is obtained by truncating this series to the first few terms, though it is not convergent.