Weight distributions of two classes of linear codes with few weights derived from Weil sums


Abstract

Linear codes with few weights have been a subject of study for many years, as they have applications in secret sharing, authentication codes, association schemes, and strongly regular graphs. In this article, two distinct classes of \(p\)-ary linear codes are constructed through the selection of two specific defining sets. Their weight distributions are completely determined for each case by detailed calculations on certain Weil sums. The constructed codes are shown to have only two, four, six, eight, and nine nonzero weights under different cases. In particular, we obtained an infinite family of two-weight optimal linear codes with respect to the Griesmer bound. Moreover, we observe that some of our newly constructed codes are minimal under certain conditions.

Keywords: Linear codes, Weight distributions, Weakly regular bent function, Weil sums. MSC Classification: 94B05, 11T71, 11T23

1 Introduction↩︎

Let \(q=p^{e}\), where \(p\) is a prime and \(e\) is a positive integer. Let \(\mathbb{F}_{q}\) be a finite field of order \(q\), and let \(\mathbb{F}_{q}^{*}=\mathbb{F}_{q}\backslash\{0\}\) be the multiplicative group of order \(q-1\). A linear code \(\mathcal{C}\) with parameters \([n, k, d]\) over \(\mathbb{F}_{q}\) is a \(k\)-dimensional subspace of \(\mathbb{F}_{q}^{n}\), where \(n\) denotes the length of the code \(\mathcal{C}\), whereas \(d\) represents the minimum (Hamming) distance of the code \(\mathcal{C}\). An \([n,k,d]\) linear code \(\mathcal{C}\) is said to be optimal if \(n\), \(k\), and \(d\) meet a bound on linear codes [1], and is called almost optimal if there exists an optimal \([n,k,d+1]\) linear code. The well-known Griesmer bound [2] for a linear \([n,k,d]\) code \(\mathcal{C}\) over \(\mathbb{F}_{q}\) with \(k\geq 1\) states that \[n\geq \sum_{i=0}^{k-1}\Big\lceil\frac{d}{q^{i}}\Big\rceil,\] where \(\lceil\cdot \rceil\) denotes the ceiling function. For \(1\leq i\leq n\), let \(A_{i}=|\{c\in\mathcal{C}:\operatorname{wt}_{H}(c)=i\}|\), where \(\operatorname{wt}_{H}(c)\) denotes the Hamming weight of the codeword \(c\) in \(\mathcal{C}\). Obviously, \(A_{0}=1\). The weight enumerator of an \([n,k]\) linear code \(\mathcal{C}\) is defined by the polynomial \(1 +A_1z +A_2z^2 +\cdots+A_nz^n\). The sequence \((1, A_1, A_2,\cdots,A_n)\) is called the weight distribution of \(\mathcal{C}\). We refer to \(\mathcal{C}\) as a \(t\)-weight code if the cardinality of the set \(\{1\leq i\leq n:A_{i}\neq 0\}\) is equal to \(t\). The weight distribution is an important research topic in coding theory, not only because the weight enumerator of a code contains crucial information about its error correction capabilities, but also because it allows the computation of the error probability or error detection and correction with respect to some algorithms [3]. The reader is referred to [4][8] for known weight enumerators of some linear codes. Furthermore, linear codes with few weights have important applications in secret sharing schemes [5], [6], [9], [10], association schemes [11], strongly regular graphs [12], and authentication codes [13]. pt For two vectors \(\bar{a}=(a_0,a_1,\cdots,a_{n-1})\) and \(\bar{b}=(b_0,b_1,\cdots,b_{n-1})\) in \(\mathbb{F}_{q}^{n}\), we say that \(\bar{a}\) covers \(\bar{b}\), if \(\operatorname{Supp}(\bar{b})\subseteq\operatorname{Supp}(\bar{a})\), where \(\operatorname{Supp}(\bar{a})=\{1\leq i\leq n: u_{i}\neq 0\}\) is the support of \(\bar{a}\). A codeword \(\bar{a}\) in \(\mathcal{C}\) over \(\mathbb{F}_{q}\) is said to be minimal if \(\bar{a}\) covers only the codeword \(\lambda\bar{a}\) for all \(\lambda\in\mathbb{F}_{q}\), but no other codewords in \(\mathcal{C}\). A linear code \(\mathcal{C}\) over \(\mathbb{F}_{q}\) is said to be minimal if every codeword in \(\mathcal{C}\) is minimal. The construction of minimal linear codes is meaningful work because of their important applications in secret sharing schemes [5], [6], [9]. The following lemma introduces a sufficient condition, which is often used to determine whether a linear code over \(\mathbb{F}_{q}\) is minimal, is presented as follows.

Lemma 1. \(\textrm{\cite{P1}}\) A linear code \(\mathcal{C}\) over \(\mathbb{F}_{q}\) is minimal if \(\frac{w_{\textit{min}}}{w_{\textit{max}}}>\frac{q-1}{q}\), where \(w_{\textit{min}}\) and \(w_{\textit{max}}\) denote the minimum and maximum nonzero Hamming weights in \(\mathcal{C}\), respectively.

pt Ding and Niederreiter [14] introduced a fundamental method for constructing linear codes based on the proper selection of a subset of finite fields. For \(D\subset \mathbb{F}_{p^e}\), they defined \[\label{EQ1} \mathcal{C}_{D}=\{c(\gamma)=(\operatorname{Tr}_{1}^{e}(\gamma x))_{x\in D}:\gamma\in\mathbb{F}_{p^e}\},\tag{1}\] where \(\operatorname{Tr}_{1}^{e}(x)=\sum_{i=0}^{e-1}x^{p^{i}}\) is the trace function from \(\mathbb{F}_{p^e}\) to \(\mathbb{F}_{p}\). From the definition of \((\ref{EQ1})\), it is clear that \(\mathcal{C}_{D}\) forms a linear code of length \(|D|\) over \(\mathbb{F}_{p}\) and the set \(D\) is called the defining set of \(\mathcal{C}_{D}\). In fact, several classes of good linear codes with few weights have been constructed using the defining-set approach over the past few decades (see [4][6], [15][25]). Recently, Cheng and Gao [26] proposed a new method for evaluating a binomial Weil sum given by \[\label{EQ0} S_{\mathcal{N}}(a,b)=\sum_{x\in\mathbb{F}_{Q}^{*}}\chi_{\phi(\mathcal{N})}\left(ax^{\frac{Q-1}{\mathcal{N}}}+bx\right),\tag{2}\] where \(a,b\in\mathbb{F}_{Q}\), \(Q=p^{\phi(\mathcal{N})}\), \(\mathcal{N}\) is a positive integer not divisible by an odd prime \(p\), and \(\operatorname{ord}_{\mathcal{N}}(p)=\phi(\mathcal{N})\). Specifically, they provide the evaluation of \(S_{\mathcal{N}}(a,b)\) for \(\mathcal{N}=2,4,\ell^{k}\text{ or }2\ell^{k}\), where \(\ell\) is an odd prime satisfying \(p\nmid\ell\) and \(k\) is a positive integer. Taking \(\mathcal{N}=\ell^k\), they then construct a new class of two-weight ternary linear codes \(\mathcal{C}_{D}\) of the form \((\ref{EQ1})\) by choosing the defining set \(D=\{x\in\mathbb{F}_{Q}^{*}:\operatorname{Tr}_{1}^{\phi(\mathcal{N})}(x^{(Q-1)/\mathcal{N}})=0\}\). Subsequently, Cheng [24] further investigated the ternary linear code \(\mathcal{C}_{D}\) of the form \((\ref{EQ1})\) to construct some classes of two-weight and four-weight linear codes, selecting the defining set as follows \[\label{EQ23} D=\{x\in\mathbb{F}_{Q}^{*}:\operatorname{Tr}_{1}^{\phi(\mathcal{N})}(x^{\frac{Q-1}{\mathcal{N}}}+\beta x)=\alpha\},\tag{3}\] where \(\mathcal{N}=2\ell^{k}\), \(Q=3^{\phi(\mathcal{N})}\), \(\alpha\in\mathbb{F}_{3}\), \(\beta\in\mathbb{F}_{Q}\), and \(\operatorname{ord}_{\mathcal{N}}(3)=\phi(\mathcal{N})\). Very recently, Cheng and Sheng [27] extended the defining set \(D\) as in \((\ref{EQ23})\) to an arbitrary odd prime \(p\) to investigate the linear code \(\mathcal{C}_{D}\).

Li et al. [15] considered the linear code of the form \[\label{EQ2} \mathcal{C}_{D}=\{c(\gamma,\delta)=(\operatorname{Tr}_{1}^{e}(\gamma x+\delta y))_{(x,y)\in D}:\gamma,\delta\in\mathbb{F}_{q}\},\tag{4}\] where \(D\subseteq\mathbb{F}_{q}^{2}\) is also called a defining set. They investigated the linear code \(\mathcal{C}_{D}\) of the form \((\ref{EQ2})\) for \(D=\{(x, y)\in \mathbb{F}_{q}^{2}\backslash\{(0,0)\}:\operatorname{Tr}_{1}^{m}(x^{N_1}+y^{N_2})=0\}\), where \(N_1, N_2 \in\{1,2, p^{\frac{e}{2}}+1\}\). Motivated by the work of [15], Wu et al. [19] constructed two classes of two-weight and three-weight linear codes \(\mathcal{C}_{D}\) of the form \((\ref{EQ2})\) and presented their weight distributions, with the defining set \(D=\{(x,y)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}:f(x)+g(y)=0\}\) by considering the two cases \((1)\) \(f(x)=\operatorname{Tr}_{1}^{e}(x)\) and \(g(y)\) is a weakly regular bent function; and \((2)\) \(f(x)\) and \(g(y)\) are both weakly regular bent functions. pt Throughout this paper, we assume \(q=p^{e}\), where \(e=\phi(\ell^{k})\), \(p\) and \(\ell\) are distinct odd primes, \(k\) is a positive integer, and \(p\) is a primitive root modulo \(2\ell^{k}\). That means \(\operatorname{ord}_{2\ell^{k}}(p)=\phi(\ell^{k})\). Motivated by the prior works, in this paper, we investigate the linear code \(\mathcal{C}_{D}\) of the form \((\ref{EQ2})\) by using the following two defining sets: \[\label{EQ9} D_{u}=\{(x,y)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}:\operatorname{Tr}_{1}^{e}(x+y^{N})=u\},\tag{5}\] and \[\label{EQ10} D^{'}=\{(x,y)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}:f(x)+\operatorname{Tr}_{1}^{e}(y^{N})=0\},\tag{6}\] where \(p\) is any odd prime, \(q=p^{e}\), \(e=\phi(\ell^{k})=(\ell-1)\ell^{k-1}\), \(u\in\mathbb{F}_{p}\), \(N=\frac{q-1}{2\ell^{k}}\), and in \((\ref{EQ10})\), we consider \(f:\mathbb{F}_{q}\rightarrow\mathbb{F}_{p}\) to be a weakly regular bent function such that \(f^{*}\) satisfies the condition \(f^{*}(cx)=c^{2}f^{*}(x)\) for any \(c\in\mathbb{F}_{p}^{*}\) and \(x\in\mathbb{F}_{q}\), where \(f^{*}\) is the dual of \(f\) discussed in section 2.3. Through detailed calculations on certain exponential sums, we obtain five classes of \(4\)-weight linear codes, one class of \(2\)-weight linear codes, two classes of \(6\)-weight linear codes, two classes of \(8\)-weight linear codes, and one class of \(9\)-weight linear codes from our construction. It is noteworthy that the defining sets in \((\ref{EQ9})\) and \((\ref{EQ10})\) used to develop linear codes in this paper deal with a new binomial Weil sum \(S_{\mathcal{N}}(a,b)\) defined in \((\ref{EQ0})\) comparing the previous works summarized in Table [Table7]. The parameters and weight distributions of these codes are completely characterized by using Weil sums and quadratic Gauss sums. In addition, we identify one infinite class of two-weight optimal codes that meets the Griesmer bound. pt The rest of this paper is organized as follows. Section \(\ref{sec:sec2}\) introduces some basic knowledge on exponential sums, cyclotomic fields, weakly regular bent functions, and related auxiliary results that will be used in the subsequent sections. In section \(\ref{sec:Sec3}\) and section \(\ref{sec:sec4}\), we first present some auxiliary results, and then we respectively give the constructions of \(p\)-ary linear codes from the defining sets \((\ref{EQ9})\) and \((\ref{EQ10})\), with their parameters and weight distributions explicitly determined. Section \(\ref{sec:sec5}\) concludes this paper.

9pt max width=0.65, center

2 Preliminaries and auxiliary lemmas↩︎

In this section, we present some preliminaries and important results related to exponential sums over finite fields, cyclotomic fields, and weakly regular bent functions, which will be used in the subsequent sections.

2.1 Exponential sums↩︎

Let \(m\geq 1\) be an integer. A canonical additive character \(\chi_{m}\) of \(\mathbb{F}_{p^m}\) is a homomorphism from the additive group \(\mathbb{F}_{p^m}\) to the set of complex numbers with absolute value \(1\). For each \(x\in\mathbb{F}_{p^m}\), \(\chi_{m}\) is defined by \[\chi_{m}(x)=\zeta_{p}^{\operatorname{Tr}_{1}^{m}(x)},\] where \(\zeta_{p}=e^{\frac{2\pi \sqrt{-1}}{p}}\) is a primitive \(p\)-th root of unity. For a fixed primitive element \(g\) of \(\mathbb{F}_{p^m}\), the quadratic multiplicative character \(\eta_{m}\) of \(\mathbb{F}_{p^m}\) is defined as \(\eta_{m}(g^{k})=e^{k\pi\sqrt{-1}}\), where \(k=0,1,\cdots,p^m-2\). From [6], it is known that for any \(x\in\mathbb{F}_{p}^{*}\), \(\eta_{m}(x)=1\), if \(m\) is even and \(\eta_{m}(x)=\eta_{1}(x)\), if \(m\) is odd. We extend this quadratic character by setting \(\eta_{m}(0)=0\). The quadratic Gauss sum \(G(\eta_{m},\chi_{m})\) over \(\mathbb{F}_{p^m}\) is defined by \[G(\eta_{m},\chi_{m})=\sum_{c\in\mathbb{F}_{p^m}^{*}}\eta_{m}(c)\chi_{m}(c).\] The notation \(\eta_{1}\) and \(\chi_{1}\) denotes the quadratic and canonical additive characters of \(\mathbb{F}_{p}\), respectively.

Lemma 2. [28] Let \(G(\eta_{m},\chi_{m})\) be defined as above; then \[G(\eta_{m},\chi_{m})=(-1)^{m-1}\sqrt{(p^{*})^{m}}=\begin{cases} (-1)^{m-1}p^{\frac{m}{2}};\text{ if }p\equiv 1\pmod{4}, \\ (-1)^{m-1}(\sqrt{-1})^{m}p^{\frac{m}{2}};\text{ if }p\equiv 3\pmod{4}, \end{cases}\] where \(p^{*}=\eta_{1}(-1)p=(-1)^{\frac{p-1}{2}}p\).

Lemma 3. [28]Let \(f(x)=r_{2}x^{2}+r_{1}x+r_{0}\in\mathbb{F}_{p^m}[x]\) with \(r_{2}\neq 0\). Then \[\sum_{x\in\mathbb{F}_{p^m}}\chi_{m}(f(x))=\chi_{m}(r_{0}-r_{1}^{2}(4r_{2})^{-1})\eta_{m}(r_{2})G(\eta_{m},\chi_{m}).\]

Throughout we assume that \(\alpha\) be a fixed primitive element of \(\mathbb{F}_{q}\), \(q=p^{e}\), \(e=\phi(\ell^{k})\), \(p\) is a primitive root modulo \(2\ell^{k}\), \(\operatorname{Ind}_{\alpha}(b)\) be the index of \(b\in\mathbb{F}_{q}^{*}\) with respect to the base \(\alpha\), and \(\xi=\alpha^{\frac{q-1}{2\ell^{k}}}\). One can check that \(\mathbb{F}_{q}=\mathbb{F}_{p}(\xi)\). It follows that \(\{\xi,\xi^2,\cdots,\xi^{e}\}\) forms a basis of \(\mathbb{F}_{q}\) over \(\mathbb{F}_{p}\). In [26], Cheng and Gao defined the following two exponential sums over \(\mathbb{F}_{q}\) given by \[\begin{align} \hskip 30pt S_{2\ell^{k}}(a,b) &:=\sum_{x\in\mathbb{F}_{q}^{*}}\chi_{e}(ax^{\frac{q-1}{2\ell^{k}}}+bx), & \label{EQ3} \end{align}\tag{7}\] and \[\begin{align} S_{2\ell^{k}}(a) &:=\sum_{i=0}^{2\ell^{k}-1}\chi_{e}(a\xi^{i}),\text{ where a,b\in\mathbb{F}_{q}.} & \label{EQ4} \end{align}\tag{8}\] Define a set \(P=\{i\in \mathbb{Z}:0\leq i\leq 2\ell^{k}-1\}\). Let \(P_{1}, P_{2}, P_{3}\), and \(P_{4}\) be the subsets of \(P\) defined as follows: \[\begin{align} P_{1} &=\{i\in P: 1\leq i \leq (\ell-1)\ell^{k-1}\}, \\ P_{2} &= \{i\in P: (\ell-1)\ell^{k-1}< i \leq \ell^{k}\}, \\ P_{3} &= \{i\in P: \ell^{k}< i \leq 2\ell^{k}-\ell^{k-1}\}, \\ P_{4} &= \{i\in P: 2\ell^{k}-\ell^{k-1}< i \leq 2\ell^{k}-1\}. \end{align}\] It is clear that \((\{0\},P_{1},P_{2},P_{3},P_{4})\) is a partition of \(P\). Now we further partition the two sets \(P_{1}\) and \(P_{3}\) into the union of three disjoint subsets, \(P_{1}=P_{1}^{(1)}\cup P_{1}^{(2)}\cup P_{1}^{(3)}\) and \(P_{3}=\{\ell^{k}+u\ell^{k-1}-v: 1\leq u\leq \ell-1\text{ and }0\leq v \leq \ell^{k-1}-1\}=P_{3}^{(1)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}\), respectively, where \[\begin{align} P_{1}^{(1)}&= \{i\in P_{1}:\ell^{k-1}\nmid i\},\text{ }P_{1}^{(2)}=\{i\in P_{1}:\ell^{k-1}\mid i\text{ and }2\nmid i\},\text{ } P_{1}^{(3)}=\{i\in P_{1}:2\ell^{k-1}\mid i\}; & \end{align}\] and \[\begin{align} P_{3}^{(1)}&= \{i\in P_{3}:\ell^{k}+u\ell^{k-1}-v: 1\leq u\leq \ell-1\text{ and }0<v\leq\ell^{k-1}-1\}, &\\ P_{3}^{(2)}& =\{i\in P_{3}:\ell^{k}+u\ell^{k-1}: 1\leq u\leq \ell-1\text{ and }2\mid u\}, &\\ P_{3}^{(3)}&=\{i\in P_{3}:\ell^{k}+u\ell^{k-1}: 1\leq u\leq \ell-1\text{ and }2\nmid u\}. & \end{align}\]

The following fundamental results from [26], [27] will be useful in the subsequent sections.

Lemma 4. If \(S_{2\ell^{k}}(a,b)\) and \(S_{2\ell^{k}}(a)\) are defined as in \((\ref{EQ3})\) and \((\ref{EQ4})\) respectively. Then, we have

  1. For any \(a\in\mathbb{F}_{q}\), we have \[S_{2\ell^{k}}(a,0)=\frac{q-1}{2\ell^{k}}S_{2\ell^{k}}(a).\]

  2. For any \(a\in\mathbb{F}_{p}\), we have \[S_{2\ell^{k}}(a)=\zeta_{p}^{\ell^{k-1}(\ell-1)a}+\zeta_{p}^{-\ell^{k-1}(\ell-1)a}+(\ell-1)(\zeta_{p}^{\ell^{k-1}a}+\zeta_{p}^{-\ell^{k-1}a})+2\ell^{k}-2\ell.\]

  3. For every \(i\in P=\{i\in \mathbb{Z}:0\leq i\leq 2\ell^{k}-1\}\) and \(a\in\mathbb{F}_{p}\), we have \[S_{2\ell^{k}}(a\xi^{i})=S_{2\ell^{k}}(a).\]

  4. For any \(a\in\mathbb{F}_{q}\) and \(b\in\mathbb{F}_{q}^{*}\), we have \[S_{2\ell^{k}}(a,b)=\chi_{e}(c)\sqrt{q}-\frac{\sqrt{q}+1}{2\ell^{k}}S_{2\ell^{k}}(c),\text{ where, c=ab^{-\frac{q-1}{2\ell^{k}}}}\]

  5. For any \(a\in \mathbb{F}_{q}\) and \(y\in\mathbb{F}_{p}^{*}\), we have \(S_{2\ell^{k}}(a,b)=S_{2\ell^{k}}(a,yb)\).

Lemma 5. [26]Let \(i\in P=\{i\in \mathbb{Z}:0\leq i\leq 2\ell^{k}-1\}\). Then \[\begin{align} \operatorname{Tr}_{1}^{e}(\xi^{i}) &= \begin{cases} (\ell-1)\ell^{k-1},\text{ if }i=0, \\ -(\ell-1)\ell^{k-1},\text{ if }i=\ell^{k}, \\ -\ell^{k-1},\text{ if }i\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ \ell^{k-1},\text{ if }i\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ 0,\text{ otherwise.} \end{cases} \end{align}\]

Remark 1. If \(b\in\mathbb{F}_{q}^{*}\) and let \(i_{b}=-\operatorname{Ind}_{\alpha}(b)\pmod{2\ell^{k}}\), then \(b^{-\frac{q-1}{2\ell^{k}}}=\alpha^{-\frac{q-1}{2\ell^{k}}\operatorname{Ind}_{\alpha}(b)}=\xi^{i_{b}}\). Clearly, \(i_{b}\in P=\{i\in \mathbb{Z}:0\leq i\leq 2\ell^{k}-1\}\) and \(\chi_{e}(z b^{-\frac{q-1}{2\ell^{k}}})=\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(\xi^{i_{b}})}\) for all \(z\in\mathbb{F}_{p}^{*}\). The value of \(\operatorname{Tr}_{1}^{e}(\xi^{i_{b}})\) can be calculated from Lemma \(\ref{Le3}\). Hence, one can evaluate \(S_{2\ell^{k}}(z,b)\) for \(z\in\mathbb{F}_{p}^{*}\) and \(b\in\mathbb{F}_{q}^{*}\).

Define the following useful notation \(w(u,b)\) as follows: \[\label{EQ22} w(u,b)=\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}S_{2\ell^{k}}(z,b),\text{ where u\in\mathbb{F}_{p} and b\in\mathbb{F}_{q}.}\tag{9}\]

Lemma 6. [27]For \(b\in\mathbb{F}_{q}^{*}\), let \(i_{b}=-\operatorname{Ind}_{\alpha}(b)\pmod{2\ell^{k}}\). Suppose \(w(u,b)\) is defined as in \((\ref{EQ22})\). Then the explicit values of \(w(u,b)\) are as follows:

  1. When \(u=b=0\). Then we have \[\begin{align} \hskip 15pt w(0,0) &= \begin{cases} \frac{q-1}{\ell^{k}}\left((p-1)\ell^{k}-p\ell+p\right);\text{ if }\ell\equiv 1\pmod{p}, \\ \frac{q-1}{\ell^{k-1}}\left((p-1)\ell^{k-1}-p\right);\text{ if }\ell\not\equiv 1\pmod{p}. \end{cases} & \end{align}\]

  2. When \(u=0\) and \(b\neq 0\). Then we have \[\begin{align} \hskip 15pt w(0,b) &=\begin{cases} \frac{\sqrt{q}+1}{\ell^{k}}(-p\ell^{k}+p\ell-p)+1;\text{ if } i_{b}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{\sqrt{q}+1}{\ell^{k}}(p\ell-p)-p+1;\text{ otherwise}, \end{cases} & \end{align}\] if \(\ell\equiv1\pmod{p}\); and \[\begin{align} \hskip 15pt w(0,b) &=\begin{cases} \frac{\sqrt{q}+1}{\ell^{k-1}}(-p\ell^{k-1}+p)+1;\text{ if }i_{b}\in\{0,\ell^{k}\}\cup P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{p(\sqrt{q}+1)}{\ell^{k-1}}-p+1;\text{ otherwise}, \end{cases} & \end{align}\] if \(\ell\not\equiv1\pmod{p}\).

  3. When \(u\neq 0\) and \(b=0\). Then we have \[\begin{align} \hskip 15pt w(u,0) &= \begin{cases} \frac{q-1}{2\ell^{k}}\left(-2\ell^{k}+p\right);\text{ if }u^{2}\equiv\phi(\ell^{k})^{2}\pmod{p}\text{ but }u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}, \\ \frac{q-1}{2\ell^{k-1}}\left(-2\ell^{k-1}+p\right);\text{ if }\text{ }u\equiv\phi(\ell^{k})\equiv\ell^{k-1}\pmod{p}\text{ or }\\u\equiv-\phi(\ell^{k})\equiv-\ell^{k-1}\pmod{p}, \\ \frac{q-1}{2\ell^{k}}(-2\ell^{k}+\ell p-p);\text{ if }u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\text{ but } u^{2}\equiv \ell^{2(k-1)}\pmod{p}, \\ 1-q;\text{ if }u^{2}\not\equiv\phi(\ell^{k})^{2}\text{ and }u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}. \end{cases} \end{align}\]

  4. When \(u\neq 0\) and \(b\neq 0\). Then \(w(u,b)=1\) if \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\). Moreover, we have the following results.

    1. \[\begin{align} \hskip 15pt w(u,b) &=\begin{cases} 1+p\sqrt{q}-p\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right);\text{ if }i_{b}=0, \\ 1-p\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right); \text{ otherwise}, \end{cases} & \end{align}\] if \(u\equiv\phi(\ell^{k})\pmod{p}\) with \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\);

    2. \[\begin{align} \hskip 15pt w(u,b) &=\begin{cases} 1+p\sqrt{q}-p\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right);\text{ if }i_{b}=\ell^{k}, \\ 1-p\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right); \text{ otherwise}, \end{cases} & \end{align}\] if \(u\equiv-\phi(\ell^{k})\pmod{p}\) with \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\);

    3. \[\begin{align} \hskip 15pt w(u,b) &=\begin{cases} 1+p\sqrt{q}-p(\ell-1)\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right);\text{ if }i_{b}\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ 1-p(\ell-1)\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right); \text{ otherwise}, \end{cases} & \end{align}\] if \(u\equiv\ell^{k-1}\pmod{p}\) with \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\);

    4. \[\begin{align} \hskip 15pt w(u,b) &=\begin{cases} 1+p\sqrt{q}-p(\ell-1)\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right);\text{ if }i_{b}\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ 1-p(\ell-1)\left(\frac{\sqrt{q}+1}{2\ell^{k}}\right); \text{ otherwise}, \end{cases} & \end{align}\] if \(u\equiv-\ell^{k-1}\pmod{p}\) with \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\);

    5. \[\begin{align} \hskip 15pt w(u,b) &=\begin{cases} 1+p\sqrt{q}-p\left(\frac{\sqrt{q}+1}{2\ell^{k-1}}\right);\text{ if }i_{b}\in \{0\}\cup P_{1}^{(2)}\cup P_{3}^{(2)}, \\ 1-p\left(\frac{\sqrt{q}+1}{2\ell^{k-1}}\right); \text{ otherwise}, \end{cases} & \end{align}\] if \(u\equiv\phi(\ell^{k})\equiv\ell^{k-1}\pmod{p}\); and

    6. \[\begin{align} \hskip 15pt w(u,b) &=\begin{cases} 1+p\sqrt{q}-p\left(\frac{\sqrt{q}+1}{2\ell^{k-1}}\right);\text{ if }i_{b}\in \{\ell^{k}\}\cup P_{1}^{(3)}\cup P_{3}^{(3)}, \\ 1-p\left(\frac{\sqrt{q}+1}{2\ell^{k-1}}\right); \text{ otherwise}, \end{cases} & \end{align}\] if \(u\equiv-\phi(\ell^{k})\equiv-\ell^{k-1}\pmod{p}\).

It is to be noted that when \(u\neq 0\), then \(u\equiv\phi(\ell^{k})\equiv\ell^{k-1}\pmod{p}\) would imply \(u\not\equiv-\phi(\ell^{k})\pmod{p}\) and \(u\not\equiv-\ell^{k-1}\pmod{p}\); and \(u\equiv-\phi(\ell^{k})\equiv-\ell^{k-1}\pmod{p}\) would imply \(u\not\equiv\phi(\ell^{k})\pmod{p}\) and \(u\not\equiv\ell^{k-1}\pmod{p}\).

2.2 Cyclotomic fields \(\mathbb{Q}(\zeta_{p})\)↩︎

Let \(\mathbb{Q}\) be the field of rational numbers and \(\mathbb{Z}\) be the set of integers. The cyclotomic field \(\mathbb{Q}(\zeta_{p})\) is obtained from the field \(\mathbb{Q}\) by adjoining the \(p\)-th primitive root of unity \(\zeta_{p}\).

Lemma 7. \(\textrm{\cite{R8}}\)Let \(F=\mathbb{Q}(\zeta_{p})\) be the \(p\)-th cyclotomic field over \(\mathbb{Q}\). Then

  1. The ring of integers in \(F=\mathbb{Q}(\zeta_{p})\) is defined as \(\mathbb{Z}(\zeta_{p})\), and an integral basis of \(\mathbb{Z}(\zeta_{p})\) is the set \(\{\zeta_{p}^{i}:1\leq i\leq p-1\}\).

  2. The field extension \(F/\mathbb{Q}\) is Galois of degree \(p-1\) and Galois group \(Gal(F/\mathbb{Q})=\{\sigma_{z}:z\in\mathbb{F}_{p}^{*}\}\), where the automorphism \(\sigma_{z}\) of \(F\) is defined by \(\sigma_{z}(\zeta_{p})=\zeta_{p}^{z}\).

  3. The field \(F\) has a unique quadratic subfield \(L=\mathbb{Q}(\sqrt{p^{*}})\), where \(p^{*}=\eta_{1}(-1)p\), \(\eta_{1}\) is the quadratic character over \(\mathbb{F}_{p}^{*}\). For \(z\in\mathbb{F}_{p}^{*}\), \(\sigma_{z}(\sqrt{p^{*}})=\eta_{1}(z)\sqrt{p^{*}}\). Therefore, the Galois group \(Gal(L/\mathbb{Q})\) is \(\{1,\sigma_{w}\}\), where \(w\) is any quadratic non-residue in \(\mathbb{F}_{p}\).

By Lemma 7, we get, \(\sqrt{p^{*}}^{m}=\eta_{1}^{\frac{m}{2}}(-1)p^{\frac{m}{2}}\), \(\sigma_{z}(\zeta_{p}^{y})=\zeta_{p}^{zy}\) and \(\sigma_{z}(\sqrt{p^{*}}^{m})=\eta_{1}^{m}(z)\sqrt{p^{*}}^{m}=\sqrt{p^{*}}^{m}\), if \(m\) is an even positive integer.

2.3 Weakly regular bent functions↩︎

Let \(f:\mathbb{F}_{p^m}\rightarrow\mathbb{F}_{p}\) be a \(p\)-ary function. The Walsh transform of \(f\) is defined by \[\mathcal{W}_{f}(\lambda)=\sum_{x\in\mathbb{F}_{q}}\zeta_{p}^{f(x)-\operatorname{Tr}_{1}^{m}(\lambda x)},\] where \(\lambda\in\mathbb{F}_{p^m}\) and \(\zeta_{p}\) is a complex primitive \(p\)-th root of unity. The \(p\)-ary function \(f\) is said to be bent if \(|\mathcal{W}_{f}(\lambda)|^{2}=p^{m}\) for all \(\lambda\in\mathbb{F}_{p^m}\). A bent function \(f\) is said to be regular bent if there exists some \(p\)-ary function \(f^{*}:\mathbb{F}_{p^m}\rightarrow\mathbb{F}_{p}\) such that \(\mathcal{W}_{f}(\lambda)=p^{m/2}\zeta_{p}^{f^{*}(\lambda)}\) for every \(\lambda\in\mathbb{F}_{p^m}\). The bent function \(f\) is called weakly regular bent if there exists a \(p\)-ary function \(f^{*}\) and a complex number \(u\) with unit magnitude satisfying \(\mathcal{W}_{f}(\lambda)=up^{\frac{m}{2}}\zeta_{p}^{f^{*}(\lambda)}\) for every \(\lambda\in\mathbb{F}_{p^m}\). Such a function \(f^{*}\) is called the dual of \(f\). The dual of a weakly regular bent function is also weakly regular bent. From [29], a weakly regular bent function \(f(x)\) satisfies \(\mathcal{W}_{f}(\lambda)=\epsilon_{f}\sqrt{p^{*}}^{m}\zeta_{p}^{f^{*}(\lambda)}\), where \(\epsilon_{f}\in\{\pm 1\}\) is called the sign of the Walsh transform of \(f(x)\) and \(p^{*}=(-1)^{\frac{p-1}{2}}p\), and the sign of the Walsh transform of \(f^{*}(x)\) is \((-1)^{(\frac{p-1}{2})m}\epsilon_{f}\). We denote \(\mathcal{RF}\) to be the set of \(p\)-ary weakly regular bent functions \(f(x)\) with \(f(0)=0\) and \(f(cx)=c^{k_{f}}f(x)\) for any \(c\in\mathbb{F}_{p}^{*}\), where \(k_{f}\) is a positive even integer with \(\operatorname{gcd}(k_{f}-1,p-1)=1\). It is well known that \(f^{*}(0)=0\) when \(f\in\mathcal{RF}\), and there is an even positive integer \(l_{f}\) satisfying \(\operatorname{gcd}(l_{f}-1,p-1)=1\) such that \(f^{*}(cx)=c^{l_{f}}f^{*}(x)\) for any \(c\in\mathbb{F}_{p}^{*}\) and \(x\in\mathbb{F}_{p^m}\) (see [20]). Weakly regular bent functions can be constructed from known planar functions. A function \(g\) from \(\mathbb{F}_{p^{m}}\) to \(\mathbb{F}_{p^{m}}\) is said to be planar if \(|\{x\in \mathbb{F}_{p^{m}}: g(x+a)-g(x)=b\}|=1\) for any \(a\in\mathbb{F}_{p^m}^{*}\) and \(b\in\mathbb{F}_{p^m}\). It is known that the \(p\)-ary functions \(f(x)=\operatorname{Tr}_{1}^{m}(\alpha g(x))\), \(\alpha\in\mathbb{F}_{p^m}\) for which \(g(x)=\sum_{0\leq i,j\leq m-1}a_{ij}x^{p^{i}+p^{j}}\) are (DO-type) planar, are all weakly regular quadratic bent functions, when \(m\) is even. For more information, we refer to [29][31]. In this paper, we mainly focus on those functions \(f\in\mathcal{RF}\) such that \(f^{*}\) is a quadratic form (i.e., \(l_{f}=2\)). The known weakly regular bent functions satisfying \(l_{f}=2\) are provided in [19].

Lemma 8. [20]Let \(f(x)\in\mathcal{RF}\) such that \(\mathcal{W}_{f}(0)=\epsilon_{f}\sqrt{p^{*}}^{m}\), where \(\epsilon_{f}\in\{1,-1\}\). Let \(f^{*}\) be the dual of \(f\). Define \(N_{f^{*}}(\lambda)=|\{a\in\mathbb{F}_{p^{m}}:f^{*}(a)=\lambda\}|\), where \(\lambda\in\mathbb{F}_{p}\). Then we have the following.

  1. When \(m\) is even, we have \[\begin{align} N_{f^{*}}(\lambda)=\begin{cases} p^{m-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{m}}{p};\text{ if }\lambda=0, \\ p^{m-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{m}}{p};\text{ if }\lambda\in\mathbb{F}_{p}^{*}. \end{cases} \end{align}\]

  2. When \(m\) is odd, we have \[\begin{align} N_{f^{*}}(\lambda)=\begin{cases} p^{m-1};\text{ if }\lambda=0, \\ p^{m-1}+\epsilon_{f}\eta_{1}(-1)\sqrt{p^{*}}^{m-1};\text{ if }\eta_{1}(\lambda)=1, \\ p^{m-1}-\epsilon_{f}\eta_{1}(-1)\sqrt{p^{*}}^{m-1};\text{ if }\eta_{1}(\lambda)=-1. \end{cases} \end{align}\]

3 Linear codes from the defining set \(D_{u}\)↩︎

In this section, we consider the linear code \(\mathcal{C}_{D_{u}}\) defined in \((\ref{EQ2})\) and \((\ref{EQ9})\). We need the following lemmas for determining the lengths and weight distributions of \(\mathcal{C}_{D_{u}}\).

Lemma 9. If \(D_{u}=\{(x,y)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}:\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})=u\}\), where \(u\in\mathbb{F}_{p}\). Let \(n_{1}=|D_{u}|\). Then \[\begin{align} \hskip 30pt n_{1}&= \begin{cases} p^{2e-1}-1;\text{ if }u=0, \\ p^{2e-1};\text{ if }u\in\mathbb{F}_{p}^{*}. \end{cases} & \end{align}\]

Proof. From the properties of the canonical additive characters and using the fact \(\sum_{x\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(x)}=0\) for all \(z\in\mathbb{F}_{p}^{*}\), we obtain \[\begin{align} n_{1} &=\frac{1}{p}\sum_{x,y\in\mathbb{F}_{q}}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{z\left(\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})-u\right)}-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz} \\ &=\frac{1}{p}\left(q^{2}+\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}\sum_{x\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(x)}\sum_{y\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})}\right)-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz} \\ &= p^{2e-1}-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz} \\ &= \begin{cases} p^{2e-1}-1;\text{ if }u=0, \\ p^{2e-1};\text{ if }u\in\mathbb{F}_{p}^{*}. \end{cases} \end{align}\] ◻

Define a notation \[\label{EQ5} N_{\gamma,\delta}^{(1)}=|\{(x,y)\in D_{u}: \operatorname{Tr}_{1}^{e}(\gamma x+\delta y)=0\}|,\tag{10}\] and the Hamming weight of the codeword \(c(\gamma,\delta)\in \mathcal{C}_{D_{u}}\) is as follows: \[\label{EQ11} \operatorname{wt}(c(\gamma,\delta))=n_{1}-N_{\gamma,\delta}^{(1)}.\tag{11}\]

Lemma 10. Let \(\gamma,\delta\in\mathbb{F}_{q}\) with \((\gamma,\delta)\neq (0,0)\) and \(N_{\gamma,\delta}^{(1)}\) be defined in \((\ref{EQ5})\). For \(b\in\mathbb{F}_{q}^{*}\), let \(\operatorname{Ind}_{\alpha}(b)\) be the index of \(b\) with respect to the base \(\alpha\) and \(i_{b}=-\operatorname{Ind}_{\alpha}(b)\pmod{2\ell^{k}}\). Assume that the set \(P\) and its partitions are defined as in section \(\ref{sec:ssec2461}\). Then the explicit value of \(N_{\gamma,\delta}^{(1)}\) is given as follows:

  1. If \(u=0\), then

    1. When \(\ell\equiv 1\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{2e-1}-1-p^{e-1}(\ell-1)\frac{q-1}{\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}-1+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}-p^{e-1}\sqrt{q};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }\\ i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ p^{2e-2}-1+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }\\ i_{\delta}\in P\backslash(P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}), \\ p^{2e-2}-1;\text{ otherwise}. \end{cases} & \end{align}\]

    2. When \(\ell\not\equiv 1\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{2e-1}-1-p^{e-1}\frac{q-1}{\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}-1+p^{e-1}\frac{\sqrt{q}+1}{\ell^{k-1}}-p^{e-1}\sqrt{q};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }\\ i_{\delta}\in \{0,\ell^{k}\}\cup P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ p^{2e-2}-1+p^{e-1}\frac{\sqrt{q}+1}{\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }\\ i_{\delta}\in P\backslash(\{0,\ell^{k}\}\cup P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}), \\ p^{2e-2}-1;\text{ otherwise}. \end{cases} & \end{align}\]

  2. If \(u\neq 0\), then

    1. When \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} 0;\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

    2. When \(u\equiv\phi(\ell^{k})\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{e-1}\frac{q-1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}+p^{e-1}\sqrt{q}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}=0, \\ p^{2e-2}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash\{0\}, \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

    3. When \(u\equiv-\phi(\ell^{k})\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{e-1}\frac{q-1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}+p^{e-1}\sqrt{q}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}=\ell^{k}, \\ p^{2e-2}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash\{\ell^{k}\}, \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

    4. When \(u\equiv\phi(\ell^{k})\equiv\ell^{k-1}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{e-1}\frac{q-1}{2\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}+p^{e-1}\sqrt{q}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in\{0\}\cup P_{1}^{(2)}\cup P_{3}^{(2)}, \\ p^{2e-2}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash(\{0\}\cup P_{1}^{(2)}\cup P_{3}^{(2)}), \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

    5. When \(u\equiv-\phi(\ell^{k})\equiv-\ell^{k-1}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{e-1}\frac{q-1}{2\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}+p^{e-1}\sqrt{q}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in\{\ell^{k}\}\cup P_{1}^{(3)}\cup P_{3}^{(3)}, \\ p^{2e-2}-p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash(\{\ell^{k}\}\cup P_{1}^{(3)}\cup P_{3}^{(3)}), \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

    6. When \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\) and \(u\equiv\ell^{(k-1)}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{e-1}(\ell-1)\frac{q-1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}+p^{e-1}\sqrt{q}-p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ p^{2e-2}-p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash(P_{1}^{(2)}\cup P_{3}^{(2)}), \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

    7. When \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\) and \(u\equiv-\ell^{(k-1)}\pmod{p}\), then \[\begin{align} N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{e-1}(\ell-1)\frac{q-1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}+p^{e-1}\sqrt{q}-p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ p^{2e-2}-p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash(P_{1}^{(3)}\cup P_{3}^{(3)}), \\ p^{2e-2};\text{ otherwise}. \end{cases} & \end{align}\]

Proof. According to the definition, we have \[\begin{align} \label{EQ6} N_{\gamma,\delta}^{(1)} &=|\{(x,y)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}:\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})=u\text{ and }\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)=0\}| \nonumber\\ &= \sum_{x,y\in\mathbb{F}_{q}}\left(\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{z\{\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})-u\}}\right)\times\left(\frac{1}{p}\sum_{\delta\in\mathbb{F}_{p}}\zeta_{p}^{\delta\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}\right)-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz} \nonumber \\ &= \frac{1}{p^{2}}\sum_{x,y\in\mathbb{F}_{q}}\left(\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z\{\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})-u\}}+1\right)\left(\sum_{\delta\in\mathbb{F}_{p}^{*}}\zeta_{p}^{\delta\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}+1\right)-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz} \nonumber \\ &= \frac{1}{p^{2}}\left(q^{2}+\sum_{x,y\in\mathbb{F}_{q}}\sum_{z,\delta\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z(\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})-u)+\delta\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}\right)-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz} \nonumber \\ &=p^{2e-2}+\frac{1}{p^{2}}\Omega_{1}-\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{-uz}, \end{align}\tag{12}\] where \(\Omega_{1}=\sum_{x,y\in\mathbb{F}_{q}}\sum_{z,w\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z(\operatorname{Tr}_{1}^{e}(x+y^{\frac{q-1}{2\ell^{k}}})-u)+w\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}\). Observe that \[\begin{align} \label{EQ7} \hskip 15pt \Omega_{1} &= \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}\sum_{w\in\mathbb{F}_{p}^{*}}\sum_{x\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}\left((1+\gamma\frac{w}{z})x\right)}\times\sum_{y\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}}+\delta\frac{w}{z}y)} \nonumber & \\ &= \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}\sum_{w\in\mathbb{F}_{p}^{*}}\sum_{x\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}\left((1+\gamma w)x\right)}\times\sum_{y\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}}+\delta w y)} & \end{align}\tag{13}\] Eq. \((\ref{EQ7})\) holds because for a fixed \(z\), as \(w\) varies over \(\mathbb{F}_{p}^{*}\), so does \(\frac{w}{z}\). If \(\gamma=0\) and \(\delta\neq 0\), it is easy to see that \(\Omega_{1}=0\). It then implies that \(N_{0,\delta}^{(1)}=\begin{cases} p^{2e-2}-1;\text{ if }u=0, \\ p^{2e-2};\text{ if }u\in\mathbb{F}_{p}^{*}. \end{cases}\) If \(\gamma\neq 0\), then from \((\ref{EQ7})\), we have \[\begin{align} \Omega_{1} &=\begin{cases} 0;\text{ if }\gamma\not\in\mathbb{F}_{p}^{*}, \\ q\sum_{z\in\mathbb{F}_{p}^{*}}\sum_{y\in\mathbb{F}_{q}}\zeta_{p}^{z\{\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}}-\frac{\delta}{\gamma}y)-u\}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}. \end{cases} \end{align}\] When \(\gamma\in\mathbb{F}_{p}^{*}\), from the definition in Eq. \((\ref{EQ3})\) and Lemma 4 (e), we have \[\begin{align} \hskip 15pt \Omega_{1} &= q\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}\left(S_{2\ell^{k}}(z,-\frac{\delta}{\gamma}z)+1\right) \nonumber &\\ &= q\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}\left(S_{2\ell^{k}}(z,\delta)+1\right) \nonumber & \\ &= q\left(w(u,\delta)+\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-uz}\right) & \end{align}\] For the case of \(u=0\) and \(\ell\equiv 1\pmod{p}\), by using Lemma 6, we obtain \[\begin{align} \label{EQ8} \hskip 15pt \Omega_{1} &=\begin{cases} q\left(q(p-1)-p(\ell-1)\frac{q-1}{\ell^{k}}\right);\text{ if }\delta=0, \\ pq\left((\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}-\sqrt{q}\right);\text{ if }\delta\neq 0\text{ with }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ pq(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}};\text{ otherwise}. \end{cases} & \end{align}\tag{14}\] This implies that when \(u=0\) and \(\ell\equiv 1\pmod{p}\), by combining Eq. \((\ref{EQ6})\) and \((\ref{EQ8})\), we obtain \[\begin{align}N_{\gamma,\delta}^{(1)} &=\begin{cases} p^{2e-2}+\frac{1}{p^{2}}\Omega_{1}-1;\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\in\mathbb{F}_{q}, \\ p^{2e-2}-1;\text{ otherwise}. \end{cases} \\ &=\begin{cases} p^{2e-1}-1-p^{e-1}(\ell-1)\frac{q-1}{\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0, \\ p^{2e-2}-1+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}-p^{e-1}\sqrt{q};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }\\i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ p^{2e-2}-1+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}};\text{ if }\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash(P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}), \\ p^{2e-2}-1;\text{ otherwise}. \end{cases} & \end{align}\] Consequently, \(N_{\gamma,\delta}^{(1)}\) can be determined accordingly for the remaining cases. The proof is completed. ◻

We are now ready to prove the main results of this section.

Theorem 1. Assume that \(q=p^{e}\) and \(e=\phi(\ell^{k})\). Let \(\mathcal{C}_{{D}_{u}}=\{(\operatorname{Tr}_{1}^{e}(\gamma x+\delta y))_{(x,y)\in D_{u}}:\gamma,\delta\in\mathbb{F}_{q}\}\), where \(D_{u}\) is defined in \((\ref{EQ9})\) with \(u\in\mathbb{F}_{p}\). Then,

  1. *If \(u=0\) and \(\ell\equiv 1\pmod{p}\) , then \(\mathcal{C}_{{D}_{0}}\) is at most four-weight \([p^{2e-1}-1,2e ]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table8}\).*

Weight Frequency
0 1
\(p^{e-1}(\ell-1)\frac{q-1}{\ell^{k}}\) \(p-1\)
\(p^{2e-2}(p-1)+p^{e-1}\left(\sqrt{q}-(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}\right)\) \((p-1)(\ell-1)\frac{q-1}{\ell^{k}}\)
\(p^{2e-2}(p-1)-p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}\) \((p-1)(\ell^{k}-\ell+1)\frac{q-1}{\ell^{k}}\)
\(p^{2e-2}(p-1)\) \((q-1)+(q-p)q\)
  1. *If \(u=0\) and \(\ell\not\equiv 1\pmod{p}\), then \(\mathcal{C}_{{D}_{0}}\) is at most four-weight \([p^{2e-1}-1,2e]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table9}\).*

Weight Frequency
0 1
\(p^{e-1}\frac{q-1}{\ell^{k-1}}\) \(p-1\)
\(p^{2e-2}(p-1)+p^{e-1}\left(\sqrt{q}-\frac{\sqrt{q}+1}{\ell^{k-1}}\right)\) \((p-1)\frac{q-1}{\ell^{k-1}}\)
\(p^{2e-2}(p-1)-p^{e-1}\frac{\sqrt{q}+1}{\ell^{k-1}}\) \((p-1)(\ell^{k-1}-1)\frac{q-1}{\ell^{k-1}}\)
\(p^{2e-2}(p-1)\) \((q-1)+(q-p)q\)
  1. *If \(u\neq 0\), \(u^{2}\not\equiv \phi(\ell^{k})^{2}\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), then \(\mathcal{C}_{{D}_{u}}\) is a two-weight \([p^{2e-1},2e]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table10}\).*

Weight Frequency
0 1
\(p^{2e-1}\) \(p-1\)
\(p^{2e-2}(p-1)\) \(q^{2}-p\)
  1. *If \(u\neq 0\), \(u^{2}\equiv \phi(\ell^{k})^{2}\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), then \(\mathcal{C}_{{D}_{u}}\) is at most four-weight \([p^{2e-1},2e]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table11}\).*

Weight Frequency
0 1
\(p^{2e-1}-p^{e-1}\frac{q-1}{2\ell^{k}}\) \(p-1\)
\(p^{2e-2}(p-1)-p^{e-1}\sqrt{q}+p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}}\) \((p-1)\frac{q-1}{2\ell^{k}}\)
\(p^{2e-2}(p-1)+p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}}\) \((p-1)(2\ell^{k}-1)\frac{q-1}{2\ell^{k}}\)
\(p^{2e-2}(p-1)\) \((q-1)+q(q-p)\)
  1. *If \(u\neq 0\) with either \(u\equiv \phi(\ell^{k})\equiv\ell^{k-1}\pmod{p}\) or \(u\equiv-\phi(\ell^{k})\equiv-\ell^{k-1}\pmod{p}\), then \(\mathcal{C}_{{D}_{u}}\) is at most four-weight \([p^{2e-1},2e]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table12}\).*

Weight Frequency
0 1
\(p^{2e-1}-p^{e-1}\frac{q-1}{2\ell^{k-1}}\) \(p-1\)
\(p^{2e-2}(p-1)-p^{e-1}\sqrt{q}+p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}}\) \((p-1)\frac{q-1}{2\ell^{k-1}}\)
\(p^{2e-2}(p-1)+p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}}\) \((p-1)(2\ell^{k-1}-1)\frac{q-1}{2\ell^{k-1}}\)
\(p^{2e-2}(p-1)\) \((q-1)+q(q-p)\)
  1. *If \(u\neq 0\), \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\) and \(u^{2}\equiv\ell^{2(k-1)}\pmod{p}\), then \(\mathcal{C}_{{D}_{u}}\) is at most four-weight \([p^{2e-1},2e]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table13}\).*

Weight Frequency
0 1
\(p^{2e-1}-p^{e-1}(\ell-1)\frac{q-1}{2\ell^{k}}\) \(p-1\)
\(p^{2e-2}(p-1)-p^{e-1}\sqrt{q}+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}}\) \((p-1)(\ell-1)\frac{q-1}{2\ell^{k}}\)
\(p^{2e-2}(p-1)+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}}\) \((p-1)(2\ell^{k}-\ell+1)\frac{q-1}{2\ell^{k}}\)
\(p^{2e-2}(p-1)\) \((q-1)+q(q-p)\)

Proof. We will prove only for the case \(u=0\) and \(\ell\equiv 1\pmod{p}\) as the remaining cases can be proved in a similar manner. From Lemma 10 and Eq. \((\ref{EQ11})\), we conclude that \(\operatorname{wt}(c(\gamma,\delta))\in\{w_{1},w_{2},w_{3},w_{4}\}\) for every \((\gamma,\delta)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}\), where \[\begin{align} w_{1} &= p^{e-1}(\ell-1)\frac{q-1}{\ell^{k}}, \\ w_{2} &= p^{2e-2}(p-1)+p^{e-1}\left(\sqrt{q}-(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}\right), \\ w_{3} &= p^{2e-2}(p-1)-p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{\ell^{k}}, \\ w_{4} &= p^{2e-2}(p-1). \\ \end{align}\] In the following, we will show their frequencies \(A_{w_{1}}\), \(A_{w_{2}}\), \(A_{w_{3}}\) and \(A_{w_{4}}\), respectively. Recall that, for \(\delta\in\mathbb{F}_{q}^{*}\), \(\operatorname{Ind}_{\alpha}(\delta)\) be the index of \(\delta\) with respect to the base \(\alpha\), where \(\alpha\) generates \(\mathbb{F}_{q}^{*}\) and \(i_{\delta}=-\operatorname{Ind}_{\alpha}(\delta)\pmod{2\ell^{k}}\). Since \(i_{\delta}\in P=\{0,1,\cdots,2\ell^{k}-1\}\), then for any subset \(Q\) of \(P\), it is easy to see that \(|\{\delta\in\mathbb{F}_{q}^{*}:i_{\delta}\in Q\}|=\frac{q-1}{2\ell^{k}}|Q|\). Note that \(|P_{1}^{(2)}|=|P_{1}^{(3)}|=|P_{3}^{(2)}|=|P_{3}^{(3)}|=\frac{\ell-1}{2}\). Therefore, we obtain

\[\begin{align} A_{w_{1}} &=|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}:\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta=0\}|=(p-1), \\ A_{w_{2}} &=|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}:\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}\}| \\ &= (p-1)(\ell-1)\frac{q-1}{\ell^{k}}, \\ A_{w_{3}} &=|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}:\gamma\in\mathbb{F}_{p}^{*}\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P\backslash (P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)})\}| \\ &= (p-1)(\ell^{k}-\ell+1)\frac{q-1}{\ell^{k}}, \\ A_{w_{4}} &=|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}:\gamma=0\text{ and }\delta\in\mathbb{F}_{q}^{*}\}|+|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}:\gamma\in\mathbb{F}_{q}\backslash\mathbb{F}_{p}\text{ and }\delta\in\mathbb{F}_{q}\}| \\ &= (q-1)+(q-p)q. \end{align}\] From the above arguments, we see that \(\operatorname{wt}(c(\gamma,\delta))\neq 0\) for all \((\gamma,\delta)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}\). Therefore, \(|\mathcal{C}_{D_{0}}|=q^{2}\) and then \(\mathcal{C}_{D_{0}}\) is of dimension \(2e\). The length of the code \(\mathcal{C}_{D_{u}}\) is obvious from Lemma \(\ref{Le8}\). This completes the proof. ◻

Remark 2. If \(u\neq 0\), \(u^{2}\equiv \phi(\ell^{k})^{2}\pmod{p}\), and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), we have \(w_{\textit{min}}=p^{2e-2}(p-1)-p^{e-1}\sqrt{q}+p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k}}\) and \(w_{\textit{max}}=p^{2e-1}-p^{e-1}\frac{q-1}{2\ell^{k}}\) for \(p^{e-1}\geq\frac{q+\sqrt{q}}{2\ell^{k}}\). One can check that \(\frac{w_{\textit{min}}}{w_{\textit{max}}}>\frac{p-1}{p}\) when \((p-1)q+1>p\sqrt{q}(2\ell^{k}-1)\). Hence, under these conditions, the \(p\)-ary linear code \(\mathcal{C}_{D_{u}}\) in Theorem \(\ref{Th1}(4)\) is minimal. pt If \(u\neq 0\) with either \(u\equiv \phi(\ell^{k})\equiv\ell^{k-1}\pmod{p}\) or \(u\equiv-\phi(\ell^{k})\equiv-\ell^{k-1}\pmod{p}\), we have \(w_{\textit{min}}=p^{2e-2}(p-1)-p^{e-1}\sqrt{q}+p^{e-1}\frac{\sqrt{q}+1}{2\ell^{k-1}}\) and \(w_{\textit{max}}=p^{2e-1}-p^{e-1}\frac{q-1}{2\ell^{k-1}}\) for \(k>1\) and \(p^{e-1}\geq\frac{q+\sqrt{q}}{2\ell^{k-1}}\). One can check that \(\frac{w_{\textit{min}}}{w_{\textit{max}}}>\frac{p-1}{p}\) when \((p-1)q+1>p\sqrt{q}(2\ell^{k-1}-1)\). Hence, under these conditions, the \(p\)-ary linear code \(\mathcal{C}_{D_{u}}\) in Theorem \(\ref{Th1}(5)\) is minimal. pt If \(u\neq 0\), \(u^{2}\not\equiv\phi(\ell^{k})^{2}\pmod{p}\), and \(u^{2}\equiv\ell^{2(k-1)}\pmod{p}\), we have \(w_{\textit{min}}=p^{2e-2}(p-1)-p^{e-1}\sqrt{q}+p^{e-1}(\ell-1)\frac{\sqrt{q}+1}{2\ell^{k}}\) and \(w_{\textit{max}}=p^{2e-1}-p^{e-1}(\ell-1)\frac{q-1}{2\ell^{k}}\) for \(p^{e-1}\geq(\ell-1)\frac{q+\sqrt{q}}{2\ell^{k}}\). One can check that \(\frac{w_{\textit{min}}}{w_{\textit{max}}}>\frac{p-1}{p}\) when \((p-1)q+1>p\sqrt{q}\left(\frac{2\ell^{k}-\ell+1}{\ell-1}\right)\). Hence, under these conditions, the \(p\)-ary linear code \(\mathcal{C}_{D_{u}}\) in Theorem \(\ref{Th1}(6)\) is minimal.

Example 1. Consider \(p=5\), \(\ell=3\), \(k=1\), and \(u=0\); then \(\ell\not\equiv 1\pmod{p}\) and \(e=\phi(6)=2\). The code \(\mathcal{C}_{D_{0}}\) has parameters \([124,4,95]\), and its weight enumerator is \(1+96z^{95}+524z^{100}+4z^{120}\). By a magma program, the obtained code \(\mathcal{C}_{D_{0}}\) is consistent with Theorem \(\ref{Th1}(2)\) (see Table \(\ref{Table9}\)).

Example 2. Consider \(p=5\), \(\ell=3\), \(k=2\), and \(u(\neq 0)\in\mathbb{F}_{5}\) such that \(u^{2}\equiv (\phi(\ell^k))^2\equiv 1\pmod{5}\) and \(u^{2}\not\equiv \ell^{2(k-1)}\equiv 4\pmod{5}\). Then \(u\in\{1,4\}\). The linear code \(\mathcal{C}_{D_{u}}\) has parameters \([48828125,12,38693750]\), and its weight enumerator is \(1+3472z^{38693750}+244078124z^{39062500}+59024z^{39084375}+4z^{46115625}\). Due to the large computation required, using a magma program to verify whether the code \(\mathcal{C}_{D_{u}}\) is consistent with Theorem \(\ref{Th1}(4)\) is not possible.

Example 3. Consider \(p=7\), \(\ell=5\), \(k=1\), and \(u(\neq 0)\in\mathbb{F}_{7}\) such that \(u^{2}\equiv(\phi(\ell^k))^2\equiv 2\pmod{7}\) and \(u^{2}\not\equiv \ell^{2(k-1)}\equiv 1\pmod{7}\). Then \(u\in\{3,4\}\). The linear code \(\mathcal{C}_{D_{u}}\) has parameters \([823543,8,690802]\), and its weight enumerator is \(1+1440z^{690802}+5750394z^{705894}+12960z^{707609}+6z^{741223}\). Due to the large computation required, using a magma program to verify whether the code \(\mathcal{C}_{D_{u}}\) is consistent with Theorem \(\ref{Th1}(4)\) is not possible.

Example 4. Consider \(p=5\), \(\ell=3\), \(k=1\), and \(u(\neq 0)\in\mathbb{F}_{5}\) such that \(u^{2}\equiv\ell^{2(k-1)}\equiv 1\pmod{5}\) and \(u^{2}\not\equiv(\phi(\ell^k))^2\equiv 4\pmod{5}\), then \(u\in\{1,4\}\) and \(e=\phi(6)=2\). The code \(\mathcal{C}_{D_{u}}\) has parameters \([125,4,85]\) and its weight enumerator is \(1+36z^{85}+524z^{100}+64z^{110}\). By a magma program, the obtained code \(\mathcal{C}_{D_{u}}\) is consistent with Theorem \(\ref{Th1}(6)\).

The following corollary provides an optimal class of linear codes under a special condition and can be proved directly from Theorem 1.

Corollary 1. Let \(u\in\mathbb{F}_{p}^{*}\) be such that \(u^{2}\not\equiv \phi(\ell^{k})^{2}\pmod{p}\) and \(u^{2}\not\equiv\ell^{2(k-1)}\pmod{p}\), then the code \(\mathcal{C}_{{D}_{u}}\) defined in Theorem \(\ref{Th1}\) is an optimal two-weight \([p^{2e-1},2e,p^{2e-2}(p-1)]\) linear code over \(\mathbb{F}_{p}\) that meets the Griesmer bound, and its weight enumerator is \(1+(p^{2e}-p)z^{p^{2e-2}(p-1)}+(p-1)z^{p^{2e-1}}\).

Example 5. Consider \(p=7\), \(\ell=5\), \(k=1\), and \(u(\neq 0)\in\mathbb{F}_{7}\) such that \(u^{2}\not\equiv \phi(\ell^{k})^{2}\equiv 2\pmod{7}\) and \(u^{2}\not\equiv \ell^{2(k-1)}\equiv 1\pmod{7}\). Then \(u\in\{2,5\}\). The code \(\mathcal{C}_{D_{u}}\) has parameters \([823543,8,705894]\) and its weight enumerator is \(1+5764794z^{705894}+6z^{823543}\). According to Corollary \(\ref{Cor1}\), the code \(\mathcal{C}_{D_{u}}\) is optimal with respect to the Griesmer bound. Due to the large computation required, using a magma program to verify whether the code \(\mathcal{C}_{D_{u}}\) is consistent with Theorem \(\ref{Th1}(3)\) is not possible.

4 Linear codes from the defining set \(D^{'}\)↩︎

In this section, we always assume \(f\in\mathcal{RF}\) such that \(f^{*}\) is a quadratic form (as discussed in section 2.3) and \(\epsilon_{f}\) is the sign of the Walsh transform of \(f(x)\). First, we need the following lemmas for determining the lengths and weight distributions of the linear code \(\mathcal{C}_{D^{'}}\) defined in \((\ref{EQ2})\) and \((\ref{EQ10})\).

Lemma 11. If \(D^{'}=\{(x,y)\in\mathbb{F}_{q}^{2}\backslash(0,0):f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})=0\}\), where \(u\in\mathbb{F}_{p}\). Let \(n_{2}=|D^{'}|\). Then \[\begin{align} n_{2}&= \begin{cases} \frac{q^{2}}{p}-1+\frac{\epsilon_{f}\sqrt{p^{*}}^{e}}{p}(q(p-1)-p(\ell-1)\frac{q-1}{\ell^{k}});\text{ if }\ell\equiv 1\pmod{p}, \\ \frac{q^{2}}{p}-1+\frac{\epsilon_{f}\sqrt{p^{*}}^{e}}{p}(q(p-1)-p\frac{q-1}{\ell^{k-1}});\text{ if }\ell\not\equiv 1\pmod{p}. \end{cases} \end{align}\]

**Proof.* Since \(e=\phi(\ell^{k})\) is even, we can say \(\sigma_{z}(\sqrt{p^{*}}^{e})=\sqrt{p^{*}}^{e}\). By using the definition of \((\ref{EQ22})\), we have \[\begin{align} \label{EQ13} n_{2} &= \frac{1}{p}\sum_{x,y\in\mathbb{F}_{q}}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{z(f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}}))}-1 \nonumber \\ &=\frac{q^{2}}{p}-1+\frac{1}{p}\sum_{x,y\in\mathbb{F}_{q}}\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z(f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}}))} \nonumber \\ &=\frac{q^{2}}{p}-1+\frac{1}{p}\sum_{z\in\mathbb{F}_{p}^{*}}\sigma_{z}\left(\epsilon_{f}\sqrt{p^{*}}^{e}\right)(S_{2\ell^{k}}(z,0)+1) \nonumber \\ &= \frac{q^{2}}{p}-1+\frac{\epsilon_{f}\sqrt{p^{*}}^{e}}{p}(w(0,0)+p-1) \end{align}\tag{15}\] Hence, the result follows from Lemma 6 (a) and Eq. \((\ref{EQ13})\). ◻*

Define a notation \[\label{EQ14} N_{\gamma,\delta}^{(2)}=|\{(x,y)\in D^{'}:\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)=0\}|,\tag{16}\] and the Hamming weight of the codeword \(c(\gamma,\delta)\in\mathcal{C}_{D^{'}}\) is as follows: \[\label{EQ15} \operatorname{wt}(c(\gamma,\delta))= n_{2}-N_{\gamma,\delta}^{(2)}.\tag{17}\]

Lemma 12. Let \(\gamma,\delta\in\mathbb{F}_{q}\) with \((\gamma,\delta)\neq (0,0)\) and \(N_{\gamma,\delta}^{(2)}\) be defined in \((\ref{EQ14})\). For \(b\in\mathbb{F}_{q}^{*}\), let \(\operatorname{Ind}_{\alpha}(b)\) be the index of \(b\) with respect to the base \(\alpha\), and \(i_{b}=-\operatorname{Ind}_{\alpha}(b)\pmod{2\ell^{k}}\). Assume that the set \(P\) and its partitions be defined as in section \(\ref{sec:ssec2461}\). Then the explicit value of \(N_{\gamma,\delta}^{(2)}\) is given as follows:

  1. When \(f^{*}(\gamma)=0\) \((\gamma\neq 0)\) and \(\delta=0\), we have \[\begin{align} N_{\gamma,\delta}^{(2)}&=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)(\ell-1)}{\ell^{k}}\right)-1;\text{ if }\ell\equiv 1\pmod{p}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)}{\ell^{k-1}}\right)-1;\text{ if }\ell\not\equiv 1\pmod{p}. \end{cases} \end{align}\]

  2. *When \(f^{*}(\gamma)=0\) and \(\delta\neq 0\), we have \[\begin{align} N_{\gamma,\delta}^{(2)}&=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{\sqrt{q}(\sqrt{q}-p)(p-1)}{p^{2}}-\frac{(\ell-1)(\sqrt{q}+1)(\sqrt{q}-p)}{p\ell^{k}}\right)-1;\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}-\frac{(\ell-1)(\sqrt{q}+1)(\sqrt{q}-p)}{p\ell^{k}}\right)-1;\text{ otherwise,} \end{cases} \end{align}\] if \(\ell\equiv 1\pmod{p}\); and \[\begin{align} N_{\gamma,\delta}^{(2)} &=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{\sqrt{q}(p-1)(\sqrt{q}-p)}{p^{2}}-\frac{(\sqrt{q}+1)(\sqrt{q}-p)}{p\ell^{k-1}}\right)-1;\text{ if }i_{\delta}\in \{0,\ell^{k}\}\cup P_{1}^{(2)}\cup P_{1}^{(3)}\cup\\ P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}-\frac{(\sqrt{q}+1)(\sqrt{q}-p)}{p\ell^{k-1}}\right)-1;\text{ otherwise,} \end{cases} \end{align}\] if \(\ell\not\equiv 1\pmod{p}\).*

  3. *When \(f^{*}(\gamma)\neq 0\) and \(\delta=0\), we have \[\begin{align} N_{\gamma,\delta}^{(2)} &=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\eta_{1}(f^{*}(a))\frac{(\ell-1)(q-1)}{p\ell^{k}}-1;\text{ if }\ell\equiv 1\pmod{p}\text{ and }p\equiv 1\pmod{4}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\eta_{1}(f^{*}(a))(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2}))\frac{q-1}{p\ell^{k}}-1;\text{ if }\ell\not\equiv 1\pmod{p}\\\text{ and }p\equiv 1\pmod{4}, \\ \frac{q^{2}}{p^{2}}-1;\text{ if }p\equiv 3\pmod{4}, \end{cases} \end{align}\] where \(t_{1}=\phi(\ell^{k})\pmod{p}\) and \(t_{2}=\ell^{k-1}\pmod{p}\).*

  4. When \(f^{*}(\gamma)\neq 0\) and \(\delta\neq 0\), we have \[\begin{align} N_{\gamma,\delta}^{(2)} &=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1+\eta_{1}(f^{*}(a)))-\frac{(\ell-1)(\sqrt{q}+1)}{p\ell^{k}}(\sqrt{q}+\eta_{1}(f^{*}(a)))\right)-1;\\\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}-\frac{(\ell-1)(\sqrt{q}+1)}{p\ell^{k}}(\sqrt{q}+\eta_{1}(f^{*}(a)))\right)-1;\text{ otherwise,} \end{cases} \end{align}\] if \(\ell\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), \[\begin{align} N_{\gamma,\delta}^{(2)} &=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\times\\ \left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1+\eta_{1}(f^{*}(\gamma))\eta_{1}(t_{1}))-\frac{\sqrt{q}+1}{p\ell^{k}}(\ell\sqrt{q}+\eta_{1}(f^{*}(\gamma))(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2})))\right)-1;\\ \text{ if }i_{\delta}\in\{0,\ell^{k}\}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\times\\ \left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1+\eta_{1}(f^{*}(\gamma))\eta_{1}(t_{2}))-\frac{\sqrt{q}+1}{p\ell^{k}}(\ell\sqrt{q}+\eta_{1}(f^{*}(\gamma))(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2})))\right)-1;\\ \text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e} \left(\frac{q(p-1)}{p^{2}}-\frac{\sqrt{q}+1}{p\ell^{k}}(\ell\sqrt{q}+\eta_{1}(f^{*}(\gamma))(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2})))\right)-1;\text{ otherwise,} \end{cases} \end{align}\] if \(\ell\not\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), \[\begin{align} N_{\gamma,\delta}^{(2)} &=\begin{cases} \frac{q^{2}}{p^2}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1+\eta_{1}(f^{*}(\gamma)))-\frac{(\ell-1)(q+\sqrt{q})}{p\ell^{k}}\right)-1;\text{ if }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ \frac{q^{2}}{p^2}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1-\eta_{1}(f^{*}(\gamma)))-\frac{(\ell-1)(q+\sqrt{q})}{p\ell^{k}}\right)-1;\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ \frac{q^{2}}{p^2}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}-\frac{(\ell-1)(q+\sqrt{q})}{p\ell^{k}}\right)-1;\text{ otherwise, } \end{cases} \end{align}\] if \(\ell\equiv 1\pmod{p}\) and \(p\equiv 3\pmod{4}\), \[\begin{align} N_{\gamma,\delta}^{(2)} &=\begin{cases} \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1-\eta_{1}(f^{*}(\gamma))\eta_{1}(t_{1}))-\frac{(q+\sqrt{q})}{p\ell^{k-1}}\right)-1;\text{ if }i_{\delta}=0, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1+\eta_{1}(f^{*}(\gamma))\eta_{1}(t_{1}))-\frac{(q+\sqrt{q})}{p\ell^{k-1}}\right)-1;\text{ if }i_{\delta}=\ell^{k}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1+\eta_{1}(f^{*}(\gamma))\eta_{1}(t_{2}))-\frac{(q+\sqrt{q})}{p\ell^{k-1}}\right)-1;\text{ if }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}+\frac{\sqrt{q}}{p}(1-\eta_{1}(f^{*}(\gamma))\eta_{1}(t_{2}))-\frac{(q+\sqrt{q})}{p\ell^{k-1}}\right)-1;\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ \frac{q^{2}}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p^{2}}-\frac{(q+\sqrt{q})}{p\ell^{k-1}}\right)-1;\text{ otherwise, } \end{cases} \end{align}\] if \(\ell\not\equiv 1\pmod{p}\) and \(p\equiv 3\pmod{4}\), where \(t_{1}=\phi(\ell^{k})\pmod{p}\) and \(t_{2}=\ell^{k-1}\pmod{p}\).

**Proof.* By the definition in \((\ref{EQ3})\) and using the fact \(S_{2\ell^{k}}(z,w \delta)=S_{2\ell^{k}}(z,\delta)\) for any \(\delta\in\mathbb{F}_{q}\) and \(z,w\in\mathbb{F}_{p}^{*}\), we obtain \[\begin{align} \label{EQ17} N_{\gamma,\delta}^{(2)} &=|\{(x,y)\in\mathbb{F}_{q}^{2}\backslash\{(0,0)\}:f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})=0\text{ and }\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)=0\}| \nonumber \\ &= \sum_{x,y\in\mathbb{F}_{q}}\left(\frac{1}{p}\sum_{z\in\mathbb{F}_{p}}\zeta_{p}^{z\{f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})\}}\right)\times\left(\frac{1}{p}\sum_{w\in\mathbb{F}_{p}}\zeta_{p}^{w\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}\right)-1 \nonumber \\ &=\frac{1}{p^{2}}\sum_{x,y\in\mathbb{F}_{q}}\left(\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z\{f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})\}}+1\right)\left(\sum_{w\in\mathbb{F}_{p}^{*}}\zeta_{p}^{w\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}+1\right)-1 \nonumber \\ &= \frac{1}{p^{2}}\left(q^{2}+\sum_{x,y\in\mathbb{F}_{q}}\sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z\{f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})\}}+\sum_{x,y\in\mathbb{F}_{q}}\sum_{z,w\in\mathbb{F}_{p}^{*}}\zeta_{p}^{z\{f(x)+\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}})\}+w\operatorname{Tr}_{1}^{e}(\gamma x+\delta y)}\right)-1 \nonumber \\ &= \frac{1}{p^{2}}\left(q^{2}+\epsilon_{f}\sqrt{p^{*}}^{e}(w(0,0)+p-1)+\sum_{z,w\in\mathbb{F}_{p}^{*}}\sum_{x\in\mathbb{F}_{q}}\zeta_{p}^{z\{f(x)+\operatorname{Tr}_{1}^{e}(\gamma\frac{w}{z}x)\}}\sum_{y\in\mathbb{F}_{q}}\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(y^{\frac{q-1}{2\ell^{k}}}+\delta\frac{w}{z}y)}\right)-1 \nonumber \\ &=\frac{1}{p^{2}}\left(q^{2}+\epsilon_{f}\sqrt{p^{*}}^{e}(w(0,0)+p-1)+\sum_{z,w\in\mathbb{F}_{p}^{*}}\sigma_{z}\left(\epsilon_{f}\sqrt{p^{*}}^{e}\zeta_{p}^{f^{*}(-\gamma w)}\right)\left(S_{2\ell^{k}}(z,\delta wz)+1\right)\right)-1 \nonumber \\ &= \frac{1}{p^{2}}\left(q^{2}+\epsilon_{f}\sqrt{p^{*}}^{e}(w(0,0)+p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\sum_{z\in\mathbb{F}_{p}^{*}}\left(S_{2\ell^{k}}(z,\delta)+1\right)\sum_{w\in\mathbb{F}_{p}^{*}}\zeta_{p}^{w^{2}zf^{*}(\gamma)}\right)-1 \nonumber \\ &= \frac{1}{p^{2}}\left(q^{2}+\epsilon_{f}\sqrt{p^{*}}^{e}(w(0,0)+p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\Omega_{2}\right)-1, \end{align}\tag{18}\] where \(\Omega_{2}=\sum_{z\in\mathbb{F}_{p}^{*}}\left(S_{2\ell^{k}}(z,\delta)+1\right)\sum_{w\in\mathbb{F}_{p}^{*}}\zeta_{p}^{w^{2}zf^{*}(\gamma)}\). The sixth equality above holds because for a fixed \(z\), as \(w\) varies over \(\mathbb{F}_{p}^{*}\), \(\frac{w}{z}\) also varies. Next, we determine the value of \(\Omega_{2}\) by considering the following three cases while \((\gamma,\delta)\) runs through \(\mathbb{F}_{q}^{2}\backslash\{(0,0)\}\). \(\text{Case }1:\) When \(f^{*}(\gamma)=0\), we have \[\begin{align} \label{EQ20} \Omega_{2} &=(p-1)\sum_{z\in\mathbb{F}_{p}^{*}}(S_{2\ell^{k}}(z,\delta)+1) \nonumber \\ &= \begin{cases} (p-1)w(0,0)+(p-1)^{2};\text{ if }\delta=0\text{ with }\gamma \neq 0, \\ (p-1)w(0,\delta)+(p-1)^{2};\text{ if }\delta\neq 0. \end{cases} \end{align}\tag{19}\] \(\text{Case }2:\) When \(f^{*}(\gamma)\neq 0\) and \(\delta=0\), by Lemma \(\ref{Le6}\), we have \[\begin{align} \label{EQ16} \Omega_{2} &= \sum_{z\in\mathbb{F}_{p}^{*}}(S_{2\ell^{k}}(z,0)+1)(\eta_{1}(zf^{*}(\gamma))\sqrt{p^{*}}-1) \nonumber \\ &= \eta_{1}(f^{*}(\gamma))\sqrt{p^{*}}\sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,0)-w(0,0)-(p-1) \end{align}\tag{20}\] From Lemma \(\ref{Le2}(a),(b)\) and the fact \(\sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)=0\), one can verify that \[\begin{align} \label{EQ18} \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,0) &= \frac{q-1}{2\ell^{k}}\sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z) \nonumber \\ &= \begin{cases} \frac{q-1}{2\ell^{k}}(\ell-1)\sqrt{p^{*}}(1+(-1)^{\frac{p-1}{2}});\text{ if }\ell\equiv 1\pmod{p}, \\ \frac{q-1}{2\ell^{k}}\sqrt{p^{*}}\left(\eta_{1}(t_{1})+(-1)^{\frac{p-1}{2}}\eta_{1}(t_{1})+(\ell-1)(\eta_{1}(t_{2})+(-1)^{\frac{p-1}{2}}\eta_{1}(t_{2}))\right);\text{ if }\\\ell\not\equiv 1\pmod{p}, \nonumber \end{cases} \\ &= \begin{cases} \frac{q-1}{\ell^{k}}(\ell-1)\sqrt{p^{*}};\text{ if }\ell\equiv 1\pmod{p}\text{ and }p\equiv 1\pmod{4}, \\ \frac{q-1}{\ell^{k}}\sqrt{p^{*}}(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2}));\text{ if }\ell\not\equiv 1\pmod{p}\\\text{ and }p\equiv 1\pmod{4}, \\ 0;\text{ if }p\equiv 3\pmod{4}, \end{cases} \end{align}\tag{21}\] where \(t_{1}=\phi(\ell^{k})\pmod{p}\) and \(t_{2}=\ell^{k-1}\pmod{p}\).*

pt \(\text{Case }3:\) When \(f^{*}(\gamma)\neq 0\) and \(\delta\neq 0\), by Lemma \(\ref{Le6}\), we have \[\begin{align} \label{EQ19} \Omega_{2} &= \sum_{z\in\mathbb{F}_{p}^{*}}(S_{2\ell^{k}}(z,\delta)+1)(\eta_{1}(zf^{*}(\gamma))\sqrt{p^{*}}-1) \nonumber \\ &= \eta_{1}(f^{*}(\gamma))\sqrt{p^{*}}\sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,\delta)-w(0,\delta)-(p-1) \end{align}\qquad{(1)}\] From Lemma \(\ref{Le2}(c),(d)\) and \((\ref{EQ18})\) it is to be noted that \[\begin{align} \label{EQ21} \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,\delta) &=\sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)(\chi_{e}(z\xi^{i_{\delta}})\sqrt{q}-\frac{\sqrt{q}+1}{2\ell^{k}}S_{2\ell^{k}}(z)) \nonumber \\ &= \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)\left(\zeta_{p}^{z\operatorname{Tr}_{1}^{e}(\xi^{i_{\delta}})}\sqrt{q}-\frac{\sqrt{q}+1}{2\ell^{k}}S_{2\ell^{k}}(z)\right) \nonumber \\ &= \begin{cases} \sqrt{p^{*}}\left(\eta_{1}(\operatorname{Tr}_{1}^{e}(\xi^{i_{\delta}}))\sqrt{q}-\frac{\sqrt{q}+1}{\ell^{k}}(\ell-1)\right);\text{ if }\ell\equiv 1\pmod{p}\\\text{ and }p\equiv 1\pmod{4}, \\ \sqrt{p^{*}}\left(\eta_{1}(\operatorname{Tr}_{1}^{e}(\xi^{i_{\delta}}))\sqrt{q}-\frac{\sqrt{q}+1}{\ell^{k}}(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2}))\right);\text{ if }\ell\not\equiv 1\pmod{p}\\\text{ and }p\equiv 1\pmod{4}, \\ \sqrt{p^{*}}\eta_{1}(\operatorname{Tr}_{1}^{e}(\xi^{i_{\delta}}))\sqrt{q};\text{ if }p\equiv 3\pmod{4}. \end{cases} \end{align}\qquad{(2)}\] By Lemma \(\ref{Le3}\), one can easily check When \(\ell\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), we have \[\begin{align} \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,\delta) &= \begin{cases} \sqrt{p^{*}}\left(\sqrt{q}-\frac{\sqrt{q}+1}{\ell^{k}}(\ell-1)\right);\text{ if }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}\cup P_{1}^{(2)}\cup P_{3}^{(2)}, \\ -\sqrt{p^{*}}\frac{\sqrt{q}+1}{\ell^{k}}(\ell-1);\text{ otherwise, } \end{cases} \end{align}\] when \(\ell\not\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), we have \[\begin{align} \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,\delta) &= \begin{cases} \sqrt{p^{*}}\left(\eta_{1}(t_{1})\sqrt{q}-\frac{\sqrt{q}+1}{\ell^{k}}(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2}))\right);\text{ if }i_{\delta}\in\{0,\ell^{k}\}, \\ \sqrt{p^{*}}\left(\eta_{1}(t_{2})\sqrt{q}-\frac{\sqrt{q}+1}{\ell^{k}}(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2}))\right);\text{ if }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}\cup\\ P_{1}^{(2)}\cup P_{3}^{(2)}, \\ -\sqrt{p^{*}}\frac{\sqrt{q}+1}{\ell^{k}}(\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2}));\text{ otherwise, } \end{cases} \end{align}\] when \(\ell\equiv 1\pmod{p}\) and \(p\equiv 3\pmod{4}\), we have \[\begin{align} \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,\delta) &= \begin{cases} -\sqrt{p^{*}q};\text{ if }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ \sqrt{p^{*}q};\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ 0;\text{ otherwise, } \end{cases} \end{align}\] and when \(\ell\not\equiv 1\pmod{p}\) and \(p\equiv 3\pmod{4}\), we have \[\begin{align} \sum_{z\in\mathbb{F}_{p}^{*}}\eta_{1}(z)S_{2\ell^{k}}(z,\delta) &= \begin{cases} \sqrt{p^{*}}\eta_{1}(t_{1})\sqrt{q};\text{ if }i_{\delta}=0, \\ -\sqrt{p^{*}}\eta_{1}(t_{1})\sqrt{q};\text{ if }i_{\delta}=\ell^{k}, \\ -\sqrt{p^{*}}\eta_{1}(t_{2})\sqrt{q};\text{ if }i_{\delta}\in P_{1}^{(3)}\cup P_{3}^{(3)}, \\ \sqrt{p^{*}}\eta_{1}(t_{2})\sqrt{q};\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{3}^{(2)}, \\ 0;\text{ otherwise, } \end{cases} \end{align}\] where \(t_{1}=\phi(\ell^{k})\pmod{p}\) and \(t_{2}=\ell^{k-1}\pmod{p}\). Then, one can explicitly calculate the values of \(\Omega_{2}\) in \((\ref{EQ20})\), \((\ref{EQ16})\) and \((\ref{EQ19})\) by the help of Lemma 6; Lemma 6 and \((\ref{EQ18})\); and Lemma \(\ref{Le5}\) and \((\ref{EQ21})\), respectively. Therefore, \(N_{\gamma,\delta}^{(2)}\) is easily determined for each of the above cases by substituting the respective values of \(\Omega_{2}\) in \((\ref{EQ17})\). ◻

With the above preparations, we are now ready to determine the parameters and weight distributions of \(\mathcal{C}_{D^{'}}\), as stated in the following main result of this section.

Theorem 2. Assume that \(q=p^{e}\) and \(e=\phi(\ell^{k})\). Let \(\mathcal{C}_{D'}=\{(\operatorname{Tr}_{1}^{e}(\gamma x+\delta y))_{(x,y)\in D^{'}}:\gamma,\delta\in\mathbb{F}_{q}\}\), where \(D^{'}\) is defined in \((\ref{EQ10})\). Define \(T:=\eta_{1}(t_{1})+(\ell-1)\eta_{1}(t_{2})\), where \(t_{1}=\phi(\ell^{k})\pmod{p}\) and \(t_{2}=\ell^{k-1}\pmod{p}\). Then,

  1. If \(\ell\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), then \(\mathcal{C}_{D^{'}}\) is at most eight-weight \(\Large[\frac{q^{2}}{p}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)}{\ell^{k}}\right)-1,2e\Large]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table1}\).
Table 1: No caption
Weight Frequency
0 1
\(\frac{q^{2}}{p^{2}}(p-1)\) \(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}-1\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}+\frac{\sqrt{q}(p-1)}{p}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right)\) \(\frac{(q-1)(\ell-1)}{\ell^{k}}\left(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right)\) \(\frac{(q-1)(\ell^{k}-\ell+1)}{\ell^{k}}\left(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(\ell-1)(q-1)}{p\ell^{k}}(p+1)\right)\) \(\frac{(p-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(\ell-1)(q-1)}{p\ell^{k}}(p-1)\right)\) \(\frac{(p-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{2\sqrt{q}}{p}-\frac{(\ell-1)(\sqrt{q}+1)}{p\ell^{k}}(\sqrt{q}(p-1)-(p+1))\right)\) \(\frac{(q-1)(\ell-1)(p-1)}{2\ell^{k}}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(\ell-1)(\sqrt{q}+1)}{p\ell^{k}}(\sqrt{q}(p-1)-(p+1))\right)\) \(\frac{(q-1)(\ell^{k}-\ell+1)(p-1)}{2\ell^{k}}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(\ell-1)(q-1)}{p\ell^{k}}(p-1)\right)\) \(\frac{(p-1)(q-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
  1. If \(\ell\equiv 1\pmod{p}\) and \(p\equiv 3\pmod{4}\), then \(\mathcal{C}_{D^{'}}\) is at most six-weight \(\Large[\frac{q^{2}}{p}+\newline\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)}{\ell^{k}}\right)-1,2e\Large]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table2}\).
Table 2: No caption.
Weight Frequency
0 1
\(\frac{q^{2}}{p^{2}}(p-1)\) \(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}-1\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}+\frac{\sqrt{q}(p-1)}{p}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right)\) \(\frac{(q-1)(\ell-1)}{\ell^{k}}\left(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right)\) \(\frac{(q-1)(\ell^{k}-\ell+1)}{\ell^{k}}\left(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(\ell-1)(q-1)}{\ell^{k}}\right)\) \((p-1)\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{2\sqrt{q}}{p}-\frac{(\ell-1)(\sqrt{q}+1)}{p\ell^{k}}(\sqrt{q}(p-1)-p)\right)\) \(\frac{(q-1)(\ell-1)(p-1)}{2\ell^{k}}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(\ell-1)(\sqrt{q}+1)}{p\ell^{k}}(\sqrt{q}(p-1)-p)\right)\) \(\frac{(q-1)(2\ell^{k}-\ell+1)(p-1)}{2\ell^{k}}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right)\)
  1. If \(\ell\not\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), then \(\mathcal{C}_{D^{'}}\) is at most eight-weight (when \(\eta_{1}(t_{1})=\eta_{1}(t_{2})\)) and at most nine-weight (when \(\eta_{1}(t_{1})=-\eta_{1}(t_{2})\)) \(\Large[\frac{q^{2}}{p}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(q-1)}{\ell^{k-1}}\right)-1,2e\Large]\) linear code over \(\mathbb{F}_{p}\) and their respective weight distributions are given in Table \(\ref{Table3}\) and \(\ref{Table4}\).
Table 3: No caption
Weight Frequency
0 1
\(\frac{q^{2}}{p^{2}}(p-1)\) \(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}-1\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}+\frac{\sqrt{q}(p-1)}{p}-\frac{(q+\sqrt{q})(p-1)}{p\ell^{k-1}}\right)\) \(\frac{q-1}{\ell^{k-1}}(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q+\sqrt{q})(p-1)}{p\ell^{k-1}}\right)\) \(\frac{(q-1)(\ell^{k-1}-1)}{\ell^{k-1}}(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)(p\ell+T)}{p\ell^{k}}\right)\) \(\frac{(p-1)}{2}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)(p\ell-T)}{p\ell^{k}}\right)\) \(\frac{(p-1)}{2}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{2\sqrt{q}}{p}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}+\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(q-1)(p-1)}{2\ell^{k-1}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}-\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(p-1)(q-1)}{2}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}+\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(p-1)(q-1)(\ell^{k-1}-1)}{2\ell^{k-1}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
Table 4: No caption
Weight Frequency
0 1
\(\frac{q^{2}}{p^{2}}(p-1)\) \(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}-1\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}+\frac{\sqrt{q}(p-1)}{p}-\frac{(q+\sqrt{q})(p-1)}{p\ell^{k-1}}\right)\) \(\frac{q-1}{\ell^{k-1}}(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q+\sqrt{q})(p-1)}{p\ell^{k-1}}\right)\) \(\frac{(q-1)(\ell^{k-1}-1)}{\ell^{k-1}}(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)(p\ell+T)}{p\ell^{k}}\right)\) \(\frac{(p-1)}{2}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)(p\ell-T)}{p\ell^{k}}\right)\) \(\frac{(p-1)}{2}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{2\sqrt{q}}{p}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}+\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(q-1)(p-1)}{2\ell^{k}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}+\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(q-1)(p-1)(\ell^{k}-1)}{2\ell^{k}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{2\sqrt{q}}{p}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}-\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(q-1)(p-1)(\ell-1)}{2\ell^{k}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q-1)}{\ell^{k-1}}+\frac{(\sqrt{q}+1)(\ell\sqrt{q}-\eta_{1}(t_{1})T)}{p\ell^{k}}\right)\) \(\frac{(q-1)(p-1)(\ell^{k}-\ell+1)}{2\ell^{k}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
  1. If \(\ell\not\equiv 1\pmod{p}\) and \(p\equiv 3\pmod{4}\), then \(\mathcal{C}_{D'}\) is at most six-weight \(\Large[\frac{q^{2}}{p}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(q-1)}{\ell^{k-1}}\right)-1,2e\Large]\) linear code over \(\mathbb{F}_{p}\) and its weight distribution given in Table \(\ref{Table5}\).
Table 5: No caption
Weight Frequency
0 1
\(\frac{q^{2}}{p^{2}}(p-1)\) \(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}-1\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}+\frac{\sqrt{q}(p-1)}{p}-\frac{(q+\sqrt{q})(p-1)}{p\ell^{k-1}}\right)\) \(\frac{q-1}{\ell^{k-1}}(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(q+\sqrt{q})(p-1)}{p\ell^{k-1}}\right)\) \(\frac{(q-1)(\ell^{k-1}-1)}{\ell^{k-1}}(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p}(p-1)-\frac{(q-1)}{\ell^{k-1}}\right)\) \((p-1)(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{2\sqrt{q}}{p}-\frac{(\sqrt{q}+1)}{p\ell^{k-1}}(\sqrt{q}(p-1)-p)\right)\) \(\frac{(q-1)(p-1)}{2\ell^{k-1}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)
\(\frac{q^{2}}{p^{2}}(p-1)+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q}{p^{2}}(p-1)^{2}-\frac{(\sqrt{q}+1)}{p\ell^{k-1}}(\sqrt{q}(p-1)-p)\right)\) \(\frac{(q-1)(p-1)(2\ell^{k-1}-1)}{2\ell^{k-1}}(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p})\)

**Proof.* We will prove only the case \(\ell\equiv 1\pmod{p}\) and \(p\equiv 1\pmod{4}\), as the remaining cases can be proved in a similar manner. It is obvious from Lemma 11 that when \(\ell\equiv 1\pmod{p}\), \(\mathcal{C}_{D'}\) has length \(n_{2}=|D^{'}|=\frac{q^{2}}{p}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)}{\ell^{k}}\right)-1\). From \((\ref{EQ15})\), we have the Hamming weight of \(c(\gamma,\delta)\) in \(\mathcal{C}_{D^{'}}\) is \(\operatorname{wt}(c(\gamma,\delta))=n_{2}-N_{\gamma,\delta}^{(2)}\), where \(N_{\gamma,\delta}^{(2)}\) is defined in \((\ref{EQ14})\). Next, we determine all possible values of \(\operatorname{wt}(c(\gamma,\delta))\) with the help of Lemma 12, while \((\gamma,\delta)\) runs through \(\mathbb{F}_{q}^{2}\backslash\{(0,0)\}\). For \(f^{*}(\gamma)=0\) \((\gamma\neq 0)\) and \(\delta=0\), we have \[\begin{align} \text{}\operatorname{wt}(c(\gamma,\delta))&=\frac{q^{2}(p-1)}{p^{2}}, \end{align}\] For \(f^{*}(\gamma)=0\) and \(\delta\neq 0\), we have \[\begin{align} \operatorname{wt}(c(\gamma,\delta)) &=\begin{cases} \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}+\frac{\sqrt{q}(p-1)}{p}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right);\text{ if }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup \\P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right);\text{ otherwise,} \end{cases} \end{align}\] For \(f^{*}(\gamma)\neq 0\) and \(\delta=0\), we have \[\begin{align} \operatorname{wt}(c(\gamma,\delta)) &=\begin{cases} \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)(p+1)}{p\ell^{k}}\right);\text{ if }\eta_{1}(f^{*}(\gamma))=1, \\ \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)(p-1)}{p\ell^{k}}\right);\text{ if }\eta_{1}(f^{*}(\gamma))=-1, \end{cases} \end{align}\] For \(f^{*}(\gamma)\neq 0\) and \(\delta\neq 0\), we have \[\begin{align} \operatorname{wt}(c(\gamma,\delta)) &=\begin{cases} \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{(\ell-1)(q-1)(p-1)}{p\ell^{k}}\right);\text{ if }\eta_{1}(f^{*}(\gamma))=-1, \\ \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{2\sqrt{q}}{p}-\frac{(\ell-1)(\sqrt{q}+1)(\sqrt{q}(p-1)-(p+1))}{p\ell^{k}}\right);\\\text{ if }\eta_{1}(f^{*}(\gamma))=1\text{ and }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3)}\cup P_{3}^{(2)}\cup P_{3}^{(3)}, \\ \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{(\ell-1)(\sqrt{q}+1)(\sqrt{q}(p-1)-(p+1))}{p\ell^{k}}\right);\text{ otherwise. } \end{cases} \end{align}\] Therefore, the eight nonzero weights of \(\mathcal{C}_{D^{'}}\) are as follows: \[\begin{align} w_{1}&= \frac{q^{2}(p-1)}{p^{2}}, \\ w_{2} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}+\frac{\sqrt{q}(p-1)}{p}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right), \\ w_{3} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{(\ell-1)(q+\sqrt{q})(p-1)}{p\ell^{k}}\right), \\ w_{4} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)(p+1)}{p\ell^{k}}\right), \\ w_{5} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)}{p}-\frac{(\ell-1)(q-1)(p-1)}{p\ell^{k}}\right), \\ w_{6} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{2\sqrt{q}}{p}-\frac{(\ell-1)(\sqrt{q}+1)(\sqrt{q}(p-1)-(p+1))}{p\ell^{k}}\right), \\ w_{7} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{(\ell-1)(\sqrt{q}+1)(\sqrt{q}(p-1)-(p+1))}{p\ell^{k}}\right), \\ w_{8} &= \frac{q^{2}(p-1)}{p^{2}}+\epsilon_{f}\sqrt{p^{*}}^{e}\left(\frac{q(p-1)^{2}}{p^{2}}-\frac{(\ell-1)(q-1)(p-1)}{p\ell^{k}}\right). \end{align}\] In the following, we will show their frequencies \(A_{w_{1}},A_{w_{2}},A_{w_{3}},A_{w_{4}},A_{w_{5}},A_{w_{6}},A_{w_{7}}\) and \(A_{w_{8}}\) respectively. Note that \(e\) is even, then from Lemma 8, we obtain \[\begin{align} A_{w_{1}}&= |\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)=0\text{ with }\gamma\neq 0\text{ and }\delta=0\}|= p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}-1, \\ A_{w_{2}} &= |\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)=0\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3))}\cup P_{3}^{(2)}\cup P_{3}^{(3)}\}| \\ &= \frac{(q-1)(\ell-1)}{\ell^{k}}\left(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}\right), \\ A_{w_{3}} &= |\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)=0\text{ and }\delta\neq 0\text{ with }i_{\delta}\not\in P_{1}^{(2)}\cup P_{1}^{(3))}\cup P_{3}^{(2)}\cup P_{3}^{(3)}\}| \\ &= \frac{(q-1)(\ell^{k}-\ell+1)}{\ell^{k}}\left(p^{e-1}+\epsilon_{f}(p-1)\frac{\sqrt{p^{*}}^{e}}{p}\right), \\ A_{w_{4}} &=|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)\neq 0\text{ with }\eta_{1}(f^{*}(\gamma))=1\text{ and }\delta=0\}| \\ &= \frac{(p-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right), \\ A_{w_{5}} &=|\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)\neq 0\text{ with }\eta_{1}(f^{*}(\gamma))=-1\text{ and }\delta=0\}| \\ &= \frac{(p-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right), \\ A_{w_{6}} &= |\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)\neq 0\text{ such that }\eta_{1}(f^{*}(\gamma))=1\text{ and }\delta\neq 0\text{ with }i_{\delta}\in P_{1}^{(2)}\cup P_{1}^{(3))}\cup P_{3}^{(2)}\cup P_{3}^{(3)}\}| \\ &= \frac{(q-1)(\ell-1)}{\ell^{k}}\times \frac{(p-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right), \\ A_{w_{7}} &= |\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}: f^{*}(\gamma)\neq 0\text{ such that }\eta_{1}(f^{*}(\gamma))=1\text{ and }\delta\neq 0\text{ with }i_{\delta}\not\in P_{1}^{(2)}\cup P_{1}^{(3))}\cup P_{3}^{(2)}\cup P_{3}^{(3)}\}| \\ &= \frac{(q-1)(\ell^{k}-\ell+1)}{\ell^{k}}\times \frac{(p-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right), \\ A_{w_{8}} &= |\{(\gamma,\delta)\in\mathbb{F}_{q}^{2}:\delta\neq 0\text{ and }f^{*}(\gamma)\neq 0\text{ such that }\eta_{1}(f^{*}(\gamma))=-1\}| \\ &= \frac{(p-1)(q-1)}{2}\left(p^{e-1}-\epsilon_{f}\frac{\sqrt{p^{*}}^{e}}{p}\right). \end{align}\] Obviously, for \(\gamma=\delta=0\), the zero codeword occurs only once in \(\mathcal{C}_{D'}\), which has exactly \(p^{2e}\) codewords, so the dimension of \(\mathcal{C}_{D'}\) is \(2e\). This completes the proof. ◻*

Example 6. Let \(f(x)=\operatorname{Tr}_{1}^{e}(x^{2})\) over \(\mathbb{F}_{p^{e}}\); then \(f(x)\) is a weakly regular bent function with \(\epsilon_{f}=-1\) and \(l_{f}=2\) from [19]. Consider \(p=3\), \(\ell=7\), and \(k=1\). Clearly, \(\ell\equiv 1\pmod{3}\), \(p\equiv 3\pmod{4}\), and \(e=\phi(14)=6\). Therefore, \(\mathcal{C}_{D'}\) is a ternary \([173420,12,114372]\) linear code, and its weight enumerator is \(1+468z^{114372}+27144z^{115182}+146016z^{115344}+162864z^{115668}+194688z^{115830}+260z^{118098}\). Due to the large computation required, using a magma program to verify whether the code \(\mathcal{C}_{D'}\) is consistent with Theorem \(\ref{Th2}(2)\) is not possible.

Example 7. Let \(f(x)=\operatorname{Tr}_{1}^{e}(\alpha x^{p^{i}+1})\), where \(\alpha\) is a primitive element over \(\mathbb{F}_{p^e}\). Then \(f(x)\) is a weakly regular bent function with \(\epsilon_{f}=1\) and \(l_{f}=2\) from [19]. Consider \(p=5\), \(\ell=3\), \(k=1\), and \(i=2\). Clearly, \(\ell\not\equiv 1\pmod{5}\), \(p\equiv 1\pmod{4}\), \(e=\phi(6)=2\), \(\eta_{1}(2)=-\eta_{1}(1)=-1\), and \(T=\eta_{1}(2)+2\eta_{1}(1)=1\). Therefore, \(\mathcal{C}_{D'}\) is a quinary \([104,4,72]\) linear code, and its weight enumerator is \(1+8z^{72}+64z^{78}+216z^{80}+128z^{82}+136z^{88}+64z^{92}+8z^{100}\). By a magma program, the obtained code \(\mathcal{C}_{D'}\) is consistent with Theorem \(\ref{Th2}(3)\) (see Table \(\ref{Table4}\)).

Example 8. Let \(f(x)=\operatorname{Tr}_{1}^{e}(x^{p^{i}+1})\) over \(\mathbb{F}_{p^e}\). Then \(f(x)\) is a weakly regular bent function with \(\epsilon_{f}=-1\) and \(l_{f}=2\) from [19]. Consider \(p=5\), \(\ell=3\), \(k=1\), and \(i=2\). Clearly, \(\ell\not\equiv 1\pmod{5}\), \(p\equiv 1\pmod{4}\), \(e=\phi(6)=2\), \(\eta_{1}(2)=-\eta_{1}(1)=-1\), and \(T=\eta_{1}(2)+2\eta_{1}(1)=1\). Therefore, \(\mathcal{C}_{D'}\) is a quinary \([144,4,108]\) linear code, and its weight enumerator is \(1+96z^{108}+204z^{112}+192z^{118}+24z^{120}+96z^{122}+12z^{128}\). By a magma program, the obtained code \(\mathcal{C}_{D'}\) is consistent with Theorem \(\ref{Th2}(3)\) (see Table \(\ref{Table4}\)).

Example 9. Let \(f(x)=\operatorname{Tr}_{1}^{e}(x^{\frac{3^{i}+1}{2}})\) over \(\mathbb{F}_{3^e}\). Then \(f(x)\) is a weakly regular bent function with \(\epsilon_{f}=-1\) and \(l_{f}=2\) from [19]. Consider \(p=3\), \(\ell=5\), \(k=1\), and \(i=5\). Clearly, \(\ell\not\equiv 1\pmod{3}\), \(p\equiv 3\pmod{4}\), and \(e=\phi(10)=4\). Therefore, \(\mathcal{C}_{D'}\) is a ternary \([2420,8,1458]\) linear code, and its weight enumerator is \(1+20z^{1458}+2400z^{1584}+1680z^{1620}+2400z^{1638}+60z^{1692}\). By a magma program, the obtained code \(\mathcal{C}_{D'}\) is consistent with Theorem \(\ref{Th2}(4)\).

5 Concluding remarks↩︎

Inspired by the work in [19], this paper investigates two classes of \(p\)-ary linear codes through specific defining sets and using the evaluation of the Weil sum \(S_{\mathcal{N}}(a,b)\) defined in \((\ref{EQ0})\). We presented several classes of linear codes with two-weight, four-weight, six-weight, eight-weight, and nine-weight over \(\mathbb{F}_{p}\) and completely determined their parameters and weight distributions (see Theorems 1 and 2). Meanwhile, we identify an infinite class of optimal linear codes in our constructions that achieve the Griesmer bound. Notably, some of our newly constructed codes are minimal under certain conditions (see Remark \(\ref{Re1}\)).

References↩︎

[1]
W. Huffman, V. Pless, Fundamentals of Error-Correcting codes, (1997).
[2]
J.H. Griesmer, A bound for error-correcting codes, 4(5), 532-542 (1960).
[3]
T. Torleiv, Codes for Error Detection, vol. 2, , (2007).
[4]
C. Ding, Linear codes from some 2-designs, 61(6), 3265–3275 (2015).
[5]
J. Yuan, C. Ding, Secret sharing schemes from three classes of linear codes, 52(1), 206–212 (2006).
[6]
K. Ding, C. Ding, A class of two-weight and three-weight codes and their applications in secret sharing, 61(11), 5835–5842 (2015).
[7]
C. Li, Q. Yue, A class of cyclic codes from two distinct finite fields, 34, 305-316 (2015).
[8]
X. Zhang, X. Du, W. Jin, Weight distributions of two classes of linear codes with five or six weights, 345, 112881 (2022).
[9]
C. Carlet, C. Ding, J. Yuan, Linear codes from perfect nonlinear mappings and their secret sharing schemes, 51(6), 2089–2102 (2005).
[10]
R. Anderson, C. Ding, T. Hellsesth, T. Klove, How to build robust shared control systems, 15(2), 111-124 (1998).
[11]
A. Calderbank, J. Goethals, Three-weight codes and association schemes, 39(4-5), 143–152 (1984).
[12]
R. Calderbank, W. Kantor, The geometry of two-weight codes, 18(2), 97-122 (1986).
[13]
C. Ding, X. Wang, A coding theory construction of new systematic authentication codes, 330(1), 81-99 (2005).
[14]
C. Ding, H. Niederreiter, Cyclotomic linear codes of order 3, 53(6), 2274–2277 (2007).
[15]
C. Li, Q. Yue, F. Fu, A construction of several classes of two-weight and three-weight linear codes, 28(1), 11–30 (2017).
[16]
S. Mesnager, L. Qian, X. Cao, M. Yuan, Several families of binary minimal linear codes from two-to-one functions, 69(5), 3285–3301 (2023).
[17]
G. Jian, Z. Lin, R. Feng, Two-weight and three-weight linear codes based on Weil sums, 57, 92–107 (2019).
[18]
S. Mesnager, A. Sinak, Several classes of minimal linear codes with few weights from weakly regular plateaued functions, 66(4), 2296–2310 (2020).
[19]
Y. Wu, N. Li, X. Zeng, Linear codes with few weights from cyclotomic classes and weakly regular bent functions, 88, 1255–1272 (2020).
[20]
C. Tang, N. Li, Y. Qi, Z. Zhou, T. Helleseth, Linear codes with two or three weights from weakly regular bent functions, 62(3), 1166–1176 (2016).
[21]
Z. Hu, L. Wang, N. Li, X. Zeng, Several classes of linear codes with few weights from the closed butterfly structure, 76, 101926 (2021).
[22]
Y. He, S. Mesnager, N. Li, L. Wang, Several classes of linear codes with few weights over finite fields, 92, 102304 (2023).
[23]
Z. Hu, M. Qiu, N. Li, X. Tang, L. Wu, Several classes of linear codes with few weights derived from Weil sums, 108, 102679 (2025).
[24]
K. Cheng, A class of ternary codes with few weights, 93, 2395–2414 (2025).
[25]
Y. Wu, Y. Pan, Linear codes from planar functions and related covering codes, 101, 102535 (2025).
[26]
K. Cheng, S. Gao, On binomial Weil sums and an application, 17, 1173–1190 (2025).
[27]
K. Cheng, D. Sheng, Weight distribution of a class of \(p\)-ary codes, preprint at (2025).
[28]
R. Lidl, H. Niederreiter, Finite Fields, , (1997).
[29]
T. Helleseth, A. Kholosha, Monomial and quadratic bent functions over the finite fields of odd characteristic, 52(5), 2018-2032 (2006).
[30]
C. Carlet, S. Mesnager, Four decades of research on bent functions, 78, 5–50 (2016).
[31]
G. Gong, T. Helleseth, H. Hu, A. Kholosha, On the dual of certain ternary weakly regular bent functions, 58(4), 2237–2243 (2012).

  1. Corresponding author.
    \(^1\)e-mail: bose0261@gmail.com,
    \(^2\)e-mail: abhay@iitism.ac.in↩︎