Let L be a semisimple Lie algebra over complex field, $H$ be its CSA, and $\Phi^+=\{\beta_1,\cdots,\beta_N\}$ be its positive roots.
For any weight $\mu\in H^*$, let $\mathfrak{P}(\mu)$ be the number of ways of expressing $\mu$ as a sum of positive roots. That is to say, $\mathfrak{P}(\mu)$ is the numbers of vectors $(r_1,\dots,r_N)$ with $r_i \in \mathbb{Z_+}$ such that $\mu=r_1\beta_1+\cdots+\beta_N$. The function $\mathfrak{P}$ is known as the Kostant partition function.
Here is the question:
Consider the case when L is simple, and $\mu$ be its longest root. Is there a general formula for calculating $\mathfrak{P}(\mu)$ ?
For type $A_l$, it's easy to check that $\mathfrak{P}(\mu)=2^{l-1}$.
For type $D_l$, I get the following result using sagemath:
$(l,\mathfrak{P}(\mu)): (3,4), (4,15), (5,55), (6,200), (7,765), (8,2625)$
To find $\mathfrak{P}(\mu)$ in specific case, I use the following property.
Proposition: let $\alpha$ be a positive root but not simple, then $\alpha$ can be expressed as a sum of two positive roots.