How can we count the number of vectors in $\mathbb{Z}_n^n$ that have $0$ as their strictly most common coordinate value appearing exactly $k$ times ? More precisely, if we denote by $$\alpha(\mathbf{x},m)=\sum_{k=1}^n \mathbb{1}\{ x_k=m \} $$ the number of times the value $m$ appears as a coordinate in a vector $\mathbf{x}=(x_1,x_2,...,x_n)$, then the numbers I am looking for are
$$ \beta(n,k) = \big| \big\{ (x_1, x_2,...,x_n) \in \mathbb{Z}_n^n: \alpha(0) = k, \alpha(\mathbf{x},0)>\alpha(\mathbf{x},m) \quad \mbox{for} \quad m=1,2,...,n-1 \big \}\big|$$
I would also like to count the vectors that have $0$ as the most common coordinate value appearing exactly $k$ times which is the same number of times another coordinate value appears. In this latter case, I would also like to know how many values are tied and the formal definition would be
$$ \hat{\beta}(n,k) = \big| \big\{ (x_1, x_2,...,x_n) \in \mathbb{Z}_n^n: \alpha(\mathbf{x},0) = k, \exists m \in \{1,2,..., n-1\} \quad \mbox{s.t.} \quad \alpha(\mathbf{x},0)=\alpha(\mathbf{x},m) \big \}\big|$$
For example, if $n=3$, then all $27$ vectors are $(0,0,0), (0,0,1),..., (2,2,2)$, of which there is $1$ that has $0$ as strictly most common coordinate value appearing $3$ times (the vector $(0,0,0)$), there are $6$ that have $0$ as strictly most common coordinate value appearing $2$ times (those are the vectors $(0,0,1), (0,1,0), (1,0,0), (0,0,2), (0,2,0)$ and $(2,0,0)$) and 6 which have $0$ as the most common value appearing once, but it is not the only most common coordinate value (those are the $6$ permutation and $3$ values are tied). So $\beta(3,3)=1, \beta(3,2) = 6$ and $\hat{\beta}(3,1) = 6$)
EDIT When $k>n/2$, calculations are easy as we only need to place the $k$ zeros and fill the remaining places with arbitrary numbers, so $\beta(n,k) = C^k_n \times (n-1)^{(n-k)}$. The problem lies in the case when $k\leq n/2$.
EDIT 2 Here are some precomputed values :
$\beta(3,k) = [0, 0, 6, 1]$ for $k=0,1,2,3$
$\beta(4,k) = [0, 0, 36, 12, 1]$ for $k=0,1,...,4$
$\beta(5,k) = [0, 0, 240, 160, 20, 1]$ for $k=0,1,...,5$
$\beta(6,k) = [0, 0, 1800, 2400, 375, 30, 1]$ for $k=0,1,...,6$
$\beta(7,k) = [0, 0, 15120, 40950, 7560, 756, 42, 1]$ for $k=0,1,...,7$
and for $n=6$ the $A[i][j]$ entry in the matrix below stores the number of times that $0$ appears a maximal number of times equal to $i$ together with $j$ other values.
[[ 0. 0. 0. 0. 720. 0.]
[ 5400. 900. 0. 0. 0. 0.]
[ 100. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0. 0.]]
The same matrix for $n=5$:
[[ 0. 0. 0. 120. 0.]
[ 360. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]]