e $T^{\mathrm{red}}(m)=T^{\mathrm{red}}_{\le m(q-1)}(m)$. This implies in particular that ${\mathrm{RM}_q}(d,m)={\mathbb{F}_q}^{q^m}$ for $d \ge m(q-1)$. Therefore, we will always assume that $d \le m(q-1).$

The result of Heijnen–Pellikaan in [@HP] on the value of $d_r({\mathrm{RM}_q}(d,m))$ can now be restated as follows, see for example [@BD]. $$\label{Hrdm}
\bar e^{\AA}_r(d,m)= \sum_{i=1}^m \mu_i q^{m-i},$$ where $(\mu_1, \dots, \mu_{m})$ is the $r$-th $m$-tuple in descending lexicographic order among all $m$-tuples $(\beta_1, \dots , \beta_{m})\in \{0,1,\dots,q-1\}^m$ satisfying $\beta_1+ \cdots + \beta_{m} \le d$.

Following the notation in [@HP], we denote with $\rho_q(d,m)$ the dimension of ${\mathrm{RM}_q}(d,m)$. Equation implies that $\rho_q(d,m)=\dim(T_{\le d}^{\mathrm{red}}(m)).$ In particular, we have $$\rho_q(d,m)=\dim(T_{\le d}(m))=\binom{m+d}{d}, \ \makebox{if $d \le q-1$},$$ since $T_{\le d}(m)=T_{\le d}^{\mathrm{red}}(m)$ if $d<q.$ Here as well as later on we use the convention that $\binom{a}{b}=0$ if $a<b$. In particular we have $\rho_q(d,m)=0$ if $d<0$. As shown in [@AK §5.4], for the general case $d \le m(q-1)$, we have $$\label{eq:dimRM}
\rho_q(d,m)=\dim(T^{\mathrm{red}}_{\le d}(m))=\sum_{i=0}^d \sum_{j=0}^{m} (-1)^j \binom{m}{j} \binom{m-1+i-qj}{m-1}.$$

In this note, we will present an easy-to-obtain expression for $\bar e^{\AA}_r(d,m)$ involving a certain representation of the number $\rho_q(d,m)-r$ that we introduce in the next section.

The $d$-th Macaulay representation with respect to $q$
======================================================

Let $d$ be a positive integer. The $d$-th Macaulay (or $d$-binomial) representation, of a nonnegative integer $N$ is a way to write $N$ as sum as certain binomial coefficients. To be precise $$N=\sum_{i=1}^d \binom{s_i}{i},$$ where the $s_i$ integers satisfying $s_d>s_{d-1}> \cdots > s_1 \ge 0$. The usual convention that $\binom{a}{b}=0$ if $a<b$, is used. For example, the $d$-th Macaulay representation of $0$ is given by $0=\sum_{i=1}^d \bi