A tight upper bound on the number of non-zero weights of a constacyclic code
For a simple-root $λ$-constacyclic code $\mathcal{C}$ over $\mathbb{F}_q$, let $\langleρ\rangle$ and $\langleρ,M\rangle$ be the subgroups of the automorphism group of $\mathcal{C}$ generated by the cyclic shift $ρ$, and by the cyclic shift $ρ$ and the scalar multiplication $M$, respectively. Let $N_G(\mathcal{C}^\ast)$ be the number of orbits of a subgroup $G$ of automorphism group of $\mathcal{C}$ acting on $\mathcal{C}^\ast=\mathcal{C}\backslash\{0\}$. In this paper, we establish explicit formulas for $N_{\langleρ\rangle}(\mathcal{C}^\ast)$ and $N_{\langleρ,M\rangle}(\mathcal{C}^\ast)$. Consequently, we derive a upper bound on the number of nonzero weights of $\mathcal{C}$. We present some irreducible and reducible $λ$-constacyclic codes, which show that the upper bound is tight. A sufficient condition to guarantee $N_{\langleρ\rangle}(\mathcal{C}^\ast)=N_{\langleρ,M\rangle}(\mathcal{C}^\ast)$ is presented.