Let $q = p^s$ and $r = q^m$, where $p$ is a prime, $s$ and $m$ are positive integers. Let $N>1$ be an integer dividing $r - 1$, and put $n = (r - 1)/N$.

Let $\alpha$ be a primitive element of $\mathbb{F}_r$, $\theta = \alpha^N$, and $Tr_{r/q}$ be the trace function from $\mathbb{F}_r$ to $\mathbb{F}_q$. The set

$$C(r,N) = \{ (Tr_{r/q}(\beta), Tr_{r/q} (\beta \theta),\dots, Tr_{r/q}(\beta \theta^{n-1})) : \beta \in \mathbb{F}_r\}$$

is an irreducible cyclice code of length $n$ over $\mathbb{F}_q$.

Let's define the set

$$Z(r,a) = \#\{x \in \mathbb{F}_r: \text{Tr}_{r/q}(x) = 0 \}.$$

The paper "The weight distribution of some irreducible cyclic codes" by Cunsheng Ding makes the following statement:

Hence, for any $\beta \in \mathbb{F}_r^*$ the Hamming weight of the codeword

$$c(\beta) = (Tr_{r/q}(\beta), Tr_{r/q} (\beta \theta),\dots, Tr_{r/q}(\beta \theta^{n-1}))$$

of the code $C(r,N)$ is equal to

$$n - \frac{Z(r, \beta) - 1}{N}.$$

Can anyone provide any proof for this statement?