1 Introduction

Throughout this paper, let p be an odd prime, and let m = es, where m, e and s (> 2) are positive integers. \(\mathbb {F}_{p^{m}}\) denotes a finite field with pm elements. The trace function from \(\mathbb {F}_{p^{m}}\) onto \(\mathbb {F}_{p^{e}}\) is denoted by \(\text {Tr}^{m}_{e}\). Moreover, the absolute trace functions of \(\mathbb {F}_{p^{m}}\) and \(\mathbb {F}_{p^{e}}\) are denoted by \(\text {Tr}^{m}_{1}\) and \(\text {Tr}^{e}_{1}\) respectively. An (n, M) code over \(\mathbb {F}_{p^{e}}\) is a subset of \(\mathbb {F}^{n}_{p^{e}}\) of size M. A linear code \(\mathcal {C}\) of length n over \(\mathbb {F}_{p^{e}}\) is a subspace of \(\mathbb {F}^{n}_{p^{e}}\). An [n, k, d] linear code \(\mathcal {C}\) over \(\mathbb {F}_{p^{e}}\) is a k-dimensional subspace of \(\mathbb {F}^{n}_{p^{e}}\) with minimum distance d. The members of the code \(\mathcal {C}\) are known as codewords. The number of nonzero coordinates in \( \textbf {c}\in \mathcal {C} \) is called the Hamming-weight wt(c) of the codeword c. Let Ai denote the number of codewords with Hamming weight i in a linear code \(\mathcal {C}\) of length n. The weight enumerator of the code \(\mathcal {C}\) is a polynomial defined by

$$1+A_{1}x+A_{2}x^{2}+\cdots+A_{n}x^{n},$$

where (1,A1,…,An) is called the weight distribution of the code \(\mathcal {C}\). There is much literature on the weight distribution of some special linear codes [2, 5, 6, 11, 13]. The complete weight enumerator of a linear code \(\mathcal {C}\) gives the frequency of each symbol contained in each codeword (see [18]). Assume \(\mathbb {F}_{p^{e}}=\{w_{0},w_{1},\ldots , w_{p^{e}-1}\}\), where w0 = 0. Composition of a vector v=\((v_{0}, v_{1},\ldots , v_{n-1})\in \mathbb {F}_{p^{e}}^{n}\), denoted by comp(v), is defined as

$$\text{comp(\textbf{v})}=(k_{0}, k_{1},\ldots, k_{p^{e}-1}),$$

where kj is the number of components vi(0 ≤ in − 1) of v that equal wj. It is obvious that \({\sum }_{j=0}^{p^{e}-1}k_{j}=n\). Let \(A(k_{0},k_{1},\ldots ,k_{p^{e}-1})\) be the number of codewords \(\textbf {c}\in \mathcal {C}\) with comp(c)=\((k_{0},k_{1},\ldots ,k_{p^{e}-1})\). Then the complete weight enumerator of the code \(\mathcal {C}\) is the polynomial

$$ \begin{array}{@{}rcl@{}} \text{CWE}(\mathcal{C})&=&\sum\limits_{\textbf{c}\in\mathcal{C}}w_{0}^{k_{0}}w_{1}^{k_{1}}{\cdots} w_{p^{e}-1}^{k_{p^{e}-1}}\\ &=&\sum\limits_{(k_{0},k_{1},\ldots,k_{p^{e}-1})\in\mathbb{B}_{n}} A(k_{0},k_{1},\ldots,k_{p^{e}-1})w_{0}^{k_{0}}w_{1}^{k_{1}}{\cdots} w_{p^{e}-1}^{k_{p^{e}-1}}, \end{array} $$

where \(\mathbb {B}_{n}=\{(k_{0},k_{1},\ldots ,k_{p^{e}-1}):0\leq k_{j}\leq n,{\sum }_{j=0}^{p^{e}-1}k_{j}=n\}\). The complete weight enumerators of linear codes not only give the weight enumerators but also demonstrate the frequency of each symbol appearing in each codeword. Consequently, the complete weight enumerators of linear codes have been of fundamental importance to theories and practices. Recently, linear codes with their complete weight enumerators have been studied extensively. Ding et al. in [7, 8] showed that complete weight enumerators can be applied to the calculation of the deception probabilities of certain authentication codes. Constructions of some families of optimal constant composition codes and the complete weight enumerators of some constant composition codes were given in [3, 4, 9].

In [1, 12, 16, 21,22,23,24], authors constructed linear codes with their complete weight enumerators over \(\mathbb {F}_{p}\) by employing absolute trace function. Construction of linear codes over \(\mathbb {F}_{p^{e}}\) by considering \(\text {Tr}_{e}^{m}\) in place of \(\text {Tr}_{1}^{m}\) result in improved relative minimum distance of the codes compared with [13, 22] (see Remarks 3.13 and 3.21, Tables 9 and 10).

In the present work, we find linear codes over \(\mathbb {F}_{p^{e}}\) by considering new defining set obtained by replacing Tr by \(\text {Tr}_{e}^{m}\) in the defining set D given in [22]. Now, we define the trace function from \(\mathbb {F}_{p^{m}}\) onto \(\mathbb {F}_{p^{e}}\) as follows:

$$ \text{Tr}^{m}_{e}(x)=\sum\limits_{k=0}^{s-1}x^{p^{ke}}.$$

Set \(D=\{x\in \mathbb {F}_{p^{m}}:\text {Tr}^{m}_{e}(x)=1~\text {and}~\text {Tr}^{m}_{e}(x^{2})=0\}=\{d_{1},d_{2},\ldots ,d_{n}\}\). We define a linear code \(\mathcal {C}_{D}\) associated with D by

$$ \mathcal{C}_{D}=\left\{\textbf{c}_{a}=\left( \text{Tr}^{m}_{e}(ad_{1}),\text{Tr}^{m}_{e}(ad_{2}),\ldots,\text{Tr}^{m}_{e}(ad_{n}) \right):a\in\ \mathbb{F}_{p^{m}}\right\}. $$
(1)

We determine the complete weight enumerator and weight distribution of the linear code \(\mathcal {C}_{D}\) of (1). We show that the several constructed linear codes are optimal with respect to the Griesmer bound. In fact, the constructed optimal codes are MDS. In [22], it is shown that there exists a unique MDS code when m = 3 while we have shown that there are infinitely many MDS codes when s = 3. Moreover, we have constructed some optimal dual codes of the codes defined by (1), and finally we have shown an application to constant composition codes.

Rest of the paper is organized as follows. In Section 2, we give some definitions and results on cyclotomic numbers and Gauss sums over finite fields. In Section 3.1, we present the complete weight enumerator and weight distribution of the proposed linear code \(\mathcal {C}_{D}\). Some examples to illustrate our main results also discussed in Section 3.1. In Section 3.2, we give some optimal dual codes. In Section 4, we have shown an application of complete weight enumerator to constant composition codes. Section 5 concludes the paper with some concluding remarks.

2 Preliminaries

We begin with some preliminaries by introducing the concept of cyclotomic numbers. Let a be a primitive element of \(\mathbb {F}_{p^{m}}\), and let pm = Nh + 1 for two positive integers N > 1 and h > 1. The cyclotomic classes of order N in \(\mathbb {F}_{p^{m}}\) are the cosets \(\mathcal {C}_{i}^{(N,p^{m})}=a^{i}\langle a^{N}\rangle \) for i = 0,1,…,N − 1, where 〈aN〉 denotes the subgroup of \(\mathbb {F}_{p^{m}}^{*}\) generated by aN. It is obvious that \(\#\mathcal {C}_{i}^{(N, p^{m})}=h\), where #X, for any set X, denotes the cardinality of the set X. For fixed i and j, we define the cyclotomic number \((i,j)^{(N,p^{m})}\) to be the number of solutions of the equation

$$x_{i}+1=x_{j}\qquad\left( x_{i}\in\mathcal{C}_{i}^{(N,p^{m})},x_{j}\in\mathcal{C}_{j}^{(N,p^{m})}\right),$$

where 1 = a0 is the multiplicative identity of \(\mathbb {F}_{p^{m}}\). That is, \((i,j)^{(N,p^{m})}\) is the number of ordered pairs (s, t) such that

$$a^{Ns+i}+1=a^{Nt+j}\qquad(0\leq s,t\leq h-1).$$

Now, we present, from [14], some notions and results about group characters and Gauss sums for later use. An additive character χ of \(\mathbb {F}_{p^{m}}\) is a mapping from \(\mathbb {F}_{p^{m}}\) into the multiplicative group of complex numbers of absolute value 1 with χ (g1 + g2) = χ (g1)χ(g2) for all \( g_{1}, g_{2}\in \mathbb {F}_{p^{m}}\). By ([14], Theorem 5.7), for any \( b\in \mathbb {F}_{p^{m}} \),

$$ \chi_{b}(x)= \zeta_{p}^{\text{Tr}^{m}_{1}(bx)}\quad(\forall~ x\in \mathbb{F}_{p^{m}}) $$
(2)

defines an additive character of \( \mathbb {F}_{p^{m}} \), where \(\zeta _{p}=e^{\frac {2\pi \sqrt {-1}}{p}}\), and every additive character can be obtained in this way. An additive character defined by χ0(x) = 1 for all \( x\in \mathbb {F}_{p^{m}}\) is called the trivial character while all other characters are called nontrivial characters. The character χ1 in (2) is called the canonical additive character of \( \mathbb {F}_{p^{m}}\). The orthogonal property of additive character χ of \( \mathbb {F}_{p^{m}} \) can be found in ([14], Theorem 5.4) and is given as

$$ \sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi(x)= \left\{\begin{array}{ll} p^{m}, &\text{if $\chi$ trivial},\\ 0, &\text{if $\chi$ non-trivial}. \end{array}\right. $$
(3)

Characters of the multiplicative group \( \mathbb {F}^{*}_{p^{m}}\) of \(\mathbb {F}_{p^{m}} \) are called multiplicative characters of \( \mathbb {F}_{p^{m}} \). By ([14], Theorem 5.8), for each j = 0,1,…,pm − 2, the function ψj with

$$\psi_{j}(g^{k})=e^{\frac{2\pi\sqrt{-1}jk}{p^{m}-1}}\quad \text{for}\ k=0, 1,\ldots, p^{m}-2 $$

defines a multiplicative character of \( \mathbb {F}_{p^{m}} \), where g is a generator of \( \mathbb {F}^{*}_{p^{m}} \). For \( j=\frac {p^{m}-1}{2} \), we have the quadratic character \( \eta =\psi _{\frac {p^{m}-1}{2}} \) defined by

$$\eta(g^{k})= \left\{\begin{array}{ll} -1, &\text{if } 2\nmid k,\\ ~~1, &\text{if } 2\mid k. \end{array}\right. $$

Moreover, we extend this quadratic character by letting η(0) = 0. The quadratic Gauss sum G = G(η, χ1) over \( \mathbb {F}_{p^{m}} \) is defined by

$$ G(\eta, \chi_{1})=\sum\limits_{x\in \mathbb{F}_{p^{m}}^{*}}\eta(x)\chi_{1}(x). $$

Now, let \( \overline {\eta } \) and \( \overline {\chi }_{1} \) denote the quadratic and canonical character of \( \mathbb {F}_{p^{e}} \) respectively. Then we define quadratic Gauss sum \( \overline {G}=G(\overline {\eta }, \overline {\chi }_{1}) \) over \( \mathbb {F}_{p^{e}} \) by

$$ G(\overline{\eta}, \overline{\chi}_{1})=\sum\limits_{x\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(x)\overline{\chi}_{1}(x).$$

The explicit values of quadratic Gauss sums are given by the following lemma.

Lemma 2.1

[14, Theorem 5.15] Let the symbols have the same meanings as before. Then

$$G(\eta, \chi_{1})=(-1)^{m-1}\sqrt{-1}^{\frac{(p-1)^{2}m}{4}}\sqrt{p^{m}},\quad G(\overline{\eta}, \overline{\chi}_{1})=(-1)^{e-1}\sqrt{-1}^{\frac{(p-1)^{2}e}{4}}\sqrt{p^{e}}. $$

Lemma 2.2

[20] Let the notations have the same significations as before. Then, for N = 2, the cyclotomic numbers are given by:

  1. 1.

    h even: \((0,0)^{(2,p^{m})}=\frac {h-2}{2}\), \((0,1)^{(2,p^{m})}=(1,0)^{(2,p^{m})}=(1,1)^{(2,p^{m})}=\frac {h}{2}\);

  2. 2.

    h odd: \((0,0)^{(2,p^{m})}=(1,0)^{(2,p^{m})}=(1,1)^{(2,p^{m})}=\frac {h-1}{2}\), \((0,1)^{(2,p^{m})}=\frac {h+1}{2}\).

Lemma 2.3

[16, Lemma 2] Let η and \(\overline {\eta }\) be the quadratic characters of \(\mathbb {F}_{p^{m}}^{*}\) and \(\mathbb {F}_{p^{e}}^{*}\) respectively. Then the following assertions hold:

  1. 1.

    if s ≥ 2 is even, then η(y) = 1 for each \(y\in \mathbb {F}^{*}_{p^{e}} \);

  2. 2.

    if s is odd, then \( \eta (y)=\overline {\eta }(y) \) for each \(y\in \mathbb {F}^{*}_{p^{e}} \).

Lemma 2.4

[14, Theorem 5.33] Let χ be a non-trivial additive character of \( \mathbb {F}_{p^{m}} \) and let \(f(x)=a_{2}x^{2} + a_{1}x + a_{0}\in \mathbb {F}_{p^{m}}[x]\) with a2≠ 0. Then

$$\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi(f(x))=\chi(a_{0} - {a_{1}^{2}}(4a_{2})^{-1})\eta(a_{2})G(\eta, \chi).$$

Lemma 2.5

[14, Theorem 2.26] Let \( \text {Tr}^{m }_{1}\) and \( \text {Tr}^{e}_{1}\) be the absolute trace functions of \( \mathbb {F}_{p^{m}} \) and \( \mathbb {F}_{p^{e}} \) respectively, and let \( \text {Tr}^{m}_{e}\) be the trace function from \( \mathbb {F}_{p^{m}} \) onto \( \mathbb {F}_{p^{e}}\). Then

$$ \text{Tr}^{m}_{1}(x)= \text{Tr}^{e}_{1}(\text{Tr}^{m}_{e}(x))$$

for all \( x\in \mathbb {F}_{p^{m}}\).

Lemma 2.6

[10, Griesmer bound] Let \(\mathcal {C}\) be an [n, k, d] linear code over \( \mathbb {F}_{p^{e}} \), where k ≥ 1. Then

$$n\geq\sum\limits_{i=0}^{k-1}\left\lceil\frac{d}{p^{ei}}\right\rceil,$$

where the symbol \(\left \lceil {x}\right \rceil \) denotes the smallest integer not less than x.

3 Main results

We divide this section into two subsections, namely 3.1 and 3.2.

3.1 Determination of the complete weight enumerator of \(\mathcal {C}_{D}\)

In this subsection, after proving some lemmas, we determine the complete weight enumerator and weight distribution of \(\mathcal {C}_{D}\) defined by (1). It is clear that the length n of the linear code \(\mathcal {C}_{D}\) is equal to # D which can be found in the following lemma.

Lemma 3.1

For \( \lambda ,\mu \in \mathbb {F}_{p^{e}}\), define

$$N(\lambda,\mu) = \#\{x\in \mathbb{F}_{p^{m}}:\mathrm{\text{Tr}}^{m}_{e}(x^{2})=\lambda\text{ and }\mathrm{\text{Tr}}^{m}_{e}(x)=\mu\}. $$

Then

  1. 1.

    if 2∣s and ps, we have

    $$N(\lambda, \mu)= \left\{\begin{array}{ll} p^{m-2e}+p^{-e}(p^{e}-1)G, &\text{if}~\lambda=0~\text{and}~\mu=0,\\ p^{m-2e} , & \text{if}~\lambda=0~\text{and}~\mu\neq0,\\ p^{m-2e}-p^{-e}G, &\text{if}~\lambda\neq0~\text{and}~\mu=0,\\ p^{m-2e}, &\text{if}~\lambda\neq0~\text{and}~\mu\neq0. \end{array}\right.~~~~~~~~~~~$$
  2. 2.

    if 2∣s and \(p\nmid s \), we have

    $$N(\lambda,\mu)= \left\{\begin{array}{ll} p^{m-2e},& \text{if}~\lambda=0~\text{and}~\mu=0,\\ p^{m-2e}+p^{-e}G, & \text{if}~\lambda=0~\text{and}~\mu\neq0,\\ p^{m-2e}, & \text{if}~\lambda\neq0~\text{and}~\mu^{2}-s\lambda=0,\\ p^{m-2e}+\overline{\eta}(\mu^{2}-s\lambda)p^{-e}G, & \text{if}~\lambda\neq0~\text{and}~\mu^{2}-s\lambda\neq0. \end{array}\right.$$
  3. 3.

    if \(2\nmid s\) and ps, we have

    $$ N(\lambda, \mu)= \left\{\begin{array}{ll} p^{m-2e} , & \text{if}~\lambda=0,\\ p^{m-2e}+\overline{\eta}(-\lambda)p^{-e}G\overline{G}, &\text{if}~\lambda\neq0~\text{and}~\mu=0,\\ p^{m-2e}, &\text{if}~\lambda\neq0~\text{and}~\mu\neq0. \end{array}\right.~~~~~~~~~~$$
  4. 4.

    if \(2\nmid s\) and \(p\nmid s \), we have

    $$ N(\lambda,\mu)= \left\{\begin{array}{ll} p^{m-2e}+\overline{\eta}(-s)p^{-2e}(p^{e}-1)G\overline{G},& \text{if}~\mu^{2}-s\lambda=0,\\ p^{m-2e}-\overline{\eta}(-s)p^{-2e}G\overline{G},& \text{if}~\mu^{2}-s\lambda\neq0. \end{array}\right.~~~~~$$

Proof

By the properties of additive character and Lemma 2.5, we have

$$ \begin{array}{@{}rcl@{}} N(\lambda,\mu)&=&p^{-2e}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\left( \sum\limits_{y\in \mathbb{F}_{p^{e}}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}\left( y(\mathrm{\text{Tr}}^{m}_{e}(x^{2})-\lambda)\right)}\right)\left( \sum\limits_{z\in \mathbb{F}_{p^{e}}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}\left( z(\mathrm{\text{Tr}}^{m}_{e}(x)-\mu)\right)}\right)\\&=& p^{-2e}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\left( 1+\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(y\mathrm{\text{Tr}}^{m}_{e}(x^{2})-y\lambda)}\right)\left( 1+\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(z\mathrm{\text{Tr}}^{m}_{e}(x)-z\mu)}\right)\\ &=&p^{m-2e}+p^{-2e}(S_{1}+S_{2}+S_{3}), \end{array} $$
(4)

where

$$ \begin{array}{@{}rcl@{}} S_{1}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(z\mathrm{\text{Tr}}^{m}_{e}(x)-z\mu )}=\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-z\mu)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}(zx)=0,\\ S_{2}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(y\mathrm{\text{Tr}}^{m}_{e}(x^{2})-y\lambda)}=\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y\lambda)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}(yx^{2}),\\ S_{3}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(y\mathrm{\text{Tr}}^{m}_{e}(x^{2})-y\lambda)}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(z\mathrm{\text{Tr}}^{m}_{e}(x)-z\mu)}\\ &=&\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y\lambda)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-z\mu)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}(yx^{2}+zx). \end{array} $$

By using Lemma 2.4, it is easy to prove that

$$S_{2}=\left\{\begin{array}{ll} G(p^{e}-1),& \text{if}~\lambda=0~\text{and}~2\mid s,\\ 0,& \text{if}~\lambda=0~\text{and}~2\nmid s,\\ -G,& \text{if}~\lambda\neq0~\text{and}~2\mid s,\\ \overline{\eta}(-\lambda)G\overline{G},& \text{if}~\lambda\neq0~\text{and}~2\nmid s. \end{array}\right.$$

By Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} S_{3}&=&\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y\lambda)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-z\mu)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}(yx^{2}+zx)\\ &=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\eta(y)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{sz^{2}}{4y}-\mu z\right), \end{array} $$

and there are the following four cases to consider: Case 1: Suppose 2∣s and ps. Then

$$ \begin{array}{@{}rcl@{}} S_{3}&=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\mu z)\\ &=&\left\{\begin{array}{ll} G(p^{e}-1)^{2},& \text{if}~\lambda=0~\text{and}~\mu=0,\\ -G(p^{e}-1),& \text{if}~\lambda=0~\text{and}~\mu\neq0,\\ -G(p^{e}-1),& \text{if}~\lambda\neq0~\text{and}~\mu=0,\\ G,& \text{if}~\lambda\neq0~\text{and}~\mu\neq0. \end{array}\right. \end{array} $$

Case 2: Suppose 2∣s and \( p\nmid s\). Then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} S_{3}&=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{sz^{2}}{4y}-\mu z\right)\\ &=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{\mu^{2}-s\lambda}{s}y\right)\overline{\eta}\left( -\frac{s}{4y}\right)\overline{G}-G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\\ &=&\left\{\begin{array}{ll} -G(p^{e}-1),& \text{if}~\lambda=0~\text{and}~\mu=0,\\ G,& \text{if}~\lambda=0~\text{and}~\mu\neq0,\\ G,& \text{if}~\lambda\neq0~\text{and}~\mu^{2}-s\lambda=0,\\ \left( \overline{\eta}(\mu^{2}-s\lambda)p^{e}+1\right)G,& \text{if}~\lambda\neq0~\text{and}~\mu^{2}-s\lambda\neq0. \end{array}\right. \end{array} $$

Case 3: Next, let \( 2\nmid s\) and ps. Then

$$ \begin{array}{@{}rcl@{}} S_{3}&=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\overline{\eta}(y)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\mu z)\\ &=&\left\{\begin{array}{ll} 0,&\text{if}~\lambda=0,\\ \overline{\eta}(-\lambda)(p^{e}-1)G\overline{G},&\text{if}~\lambda\neq0~\text{and}~\mu=0,\\ -\overline{\eta}(-\lambda)G\overline{G},&\text{if}~\lambda\neq0~\text{and}~\mu\neq0. \end{array}\right. \end{array} $$

Case 4: Finally, let \( 2\nmid s\) and \( p\nmid s\). Then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} S_{3}&=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\overline{\eta}(y )\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{sz^{2}}{4y}-\mu z\right)\\ &=&G\overline{G}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\overline{\eta}(y)\overline{\chi}_{1}\left( \frac{\mu^{2}y}{s}\right)\overline{\eta}\left( -\frac{s}{4y}\right)-G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\overline{\eta}(y)\\ &=&\overline{\eta}(-s)G\overline{G}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{\mu^{2}-s\lambda}{s}y\right)-G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-\lambda y)\overline{\eta}(y)\\ &=&\left\{\begin{array}{ll} \overline{\eta}(-s)(p^{e}-1)G\overline{G},& \text{if}~\lambda=0~\text{and}~\mu=0,\\ -\overline{\eta}(-s)G\overline{G},& \text{if}~\lambda=0~\text{and}~\mu\neq0,\\ \left( (p^{e}-1)\overline{\eta}(-s)-\overline{\eta}(-\lambda)\right)G\overline{G},& \text{if}~\lambda\neq0~\text{and}~\mu^{2}-s\lambda=0,\\ -\left( \overline{\eta}(-s)+\overline{\eta}(-\lambda)\right)G\overline{G},& \text{if}~\lambda\neq0~\text{and}~\mu^{2}-s\lambda\neq0. \end{array}\right. \end{array} $$

Combining (4) and the values of S1, S2 and S3, the proof of the lemma is completed. □

Lemma 3.2

For \( a\in \mathbb {F}_{p^{m}}^{*} \) and \( c\in \mathbb {F}_{p^{e}}^{*} \), let

$$\aleph_{2}=\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}\left( y(\mathrm{\text{Tr}}^{m}_{e}(x)-1)\right)}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}_{1}^{e}\left( w(\mathrm{\text{Tr}}_{e}^{m}(ax)-c)\right)}.$$

Then

$$\aleph_{2}=\left\{\begin{array}{ll} (p^{e}-1)p^{m},& \text{if}~a\in\mathbb{F}_{p^{e}}^{*}~\text{and}~c=a,\\ -p^{m},& \text{if}~a\in\mathbb{F}_{p^{e}}^{*}~\text{and}~c\neq a,\\ 0,& \text{otherwise}. \end{array}\right.$$

Proof

We have

$$\aleph_{2}=\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(-y-cw)}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\zeta_{p}^{\mathrm{\text{Tr}}^{m}_{1}((aw+y)x)}.$$

One may easily verify that the equation aw + y = 0 has solutions if and only if \(a\in \mathbb {F}_{p^{e}}^{*} \) for \( y,w\in \mathbb {F}_{p^{e}}^{*} \). Then 2 = 0 if \(a\notin \mathbb {F}_{p^{e}}^{*} \). Hence, if \(a\in \mathbb {F}_{p^{e}}^{*} \), we have

$$\aleph_{2}=\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( (a-c)w\right)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}\left( (aw+y)x\right)=p^{m}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( (a-c)w\right).$$

By using orthogonal property of additive character, we get the lemma.□

Let \(a\in \mathbb {F}^{*}_{p^{m} }\) and \(c\in \mathbb {F}^{*}_{p^{e}}\), and let \(s=\text {Tr}^{m}_{e}(1)\). For the sake of simplicity, we denote \(\nabla =(\text {Tr}^{m}_{e}(a))^{2}-s\text {Tr}^{m}_{e}(a^{2})\) and \(\phi (c)=-sc^{2}+2c\text {Tr}^{m}_{e}(a) -\text {Tr}^{m}_{e}(a^{2})\) in the rest of the paper.

Lemma 3.3

For \( a\in \mathbb {F}^{*}_{p^{m}} \) and \( c\in \mathbb {F}^{*}_{p^{e}} \), let

$$\aleph_{3}=\sum\limits_{x\in \mathbb{F}_{p^{m}}}{\sum}_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}(z\mathrm{\text{Tr}}^{m}_{e}(x^{2}))}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}_{1}^{e}\left( w(\mathrm{\text{Tr}}_{e}^{m}(ax)-c)\right)}.$$

Then

$$ \aleph_{3}=\left\{\begin{array}{ll} -(p^{e}-1)G,& \text{if}~2\mid s~\text{and}~\text{Tr}^{m}_{e}(a^{2})=0,\\ G,& \text{if}~2\mid s~\text{and}~\text{Tr}^{m}_{e}(a^{2})\neq0,\\ 0,& \text{if}~2\nmid s~\text{and}~\text{Tr}^{m}_{e}(a^{2})=0,\\ -\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},& \text{if}~2\nmid s~\text{and}~\text{Tr}^{m}_{e}(a^{2})\neq0. \end{array}\right.$$

Proof

By Lemmas 2.4 and 2.5, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{3}&=&\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}(zx^{2}+awx)\\ &=&\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{w^{2}\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\eta(z)G\\ &=&\left\{\begin{array}{ll} G\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{w^{2}\text{Tr}^{m}_{e}(a^{2})}{4z}\right),&\text{if}~2\mid s,\\ G\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{w^{2}\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\eta}(z),& \text{if}~2\nmid s, \end{array}\right. \end{array} $$

as required.□

Lemma 3.4

For \( a\in \mathbb {F}_{p^{m}}^{*} \) and \( c\in \mathbb {F}_{p^{e}}^{*} \), let

$$\aleph_{4}=\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}\left( y(\mathrm{\text{Tr}}^{m}_{e}(x)-1)\right)}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}^{e}_{1}\left( z\mathrm{\text{Tr}}^{m}_{e}(x^{2})\right)}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\mathrm{\text{Tr}}_{1}^{e}\left( w(\mathrm{\text{Tr}}_{e}^{m}(ax)-c)\right)}.$$

Then we have the following cases:

  1. 1.

    If 2∣s and ps, then

    $$\aleph_{4}=\left\{\begin{array}{ll} (p^{e}-1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})=0~\text{and}~\text{Tr}^{m}_{e}(a)=0,\\ -G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})=0~\text{and}~\text{Tr}^{m}_{e}(a)\neq0,\\ -G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0~\text{and}~\text{Tr}^{m}_{e}(a)=0,\\ (p^{2e}-p^{e}-1)G,&\text{if}~\text{Tr}^{m}_{e}(a^{2})\text{Tr}^{m}_{e}(a)\neq0~\text{and}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a),\\ -(p^{e}+1)G,&\text{if}~\text{Tr}^{m}_{e}(a^{2})\text{Tr}^{m}_{e}(a)\neq0~\text{and}~\text{Tr}^{m}_{e}(a^{2})\neq2c\text{Tr}^{m}_{e}(a). \end{array}\right. $$
  2. 2.

    If 2∣s and \(p\nmid s\), then

    $$\aleph_{4}=\left\{\begin{array}{ll} (p^{2e}-p^{e}-1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\nabla=0~\text{and}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2}),\\ (p^{2e}-p^{e}-1)G,&\text{if }\text{Tr}^{m}_{e}(a^{2})=0,~\text{Tr}^{m}_{e}(a)\neq0\text{ and }cs= 2\text{Tr}^{m}_{e}(a),\\ -(p^{e}+1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\nabla=0~\text{and}~c\text{Tr}^{m}_{e}(a)\neq \text{Tr}^{m}_{e}(a^{2}),\\ -(p^{e}+1)G,&\text{if }\text{Tr}^{m}_{e}(a^{2})=0,~\text{Tr}^{m}_{e}(a)\neq0\text{ and }cs\neq 2\text{Tr}^{m}_{e}(a),\\ (p^{2e}-2p^{e}-1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\overline{\eta}(\nabla)=1~and~\phi(c)=0,\\ -(2p^{e}+1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\overline{\eta}(\nabla)=1~\text{and}~\phi(c)\neq0,\\ -G,& \text{if}~\text{Tr}_{e}^{m}(a^{2})\neq0\text{ and }\overline{\eta}(\nabla) = -1\text{ or }\text{Tr}^{m}_{e}(a^{2}) = 0\text{ and }\text{Tr}^{m}_{e}(a) = 0. \end{array}\right.$$
  3. 3.

    If \( 2\nmid s \) and ps, then

    $$ \aleph_{4}=\left\{\begin{array}{ll} 0,&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0~\text{and}~\text{Tr}^{m}_{e}(a)=0,\\ \overline{\eta}(\frac{c\text{Tr}^{m}_{e}(a)}{2})p^{e}G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})=0~\text{and}~\text{Tr}^{m}_{e}(a)\neq0,\\ \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0~\text{and}~\text{Tr}^{m}_{e}(a)=0,\\ \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})\text{Tr}^{m}_{e}(a)\neq0~\text{and}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a),\\ \overline{\eta}(2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2}))p^{e}G\overline{G}\\~~~~~+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})\text{Tr}^{m}_{e}(a)\neq0~\text{and}~\text{Tr}^{m}_{e}(a^{2})\neq2c\text{Tr}^{m}_{e}(a). \end{array}\right.~~~~~~~~~~~$$
  4. 4.

    If \( 2\nmid s \) and \(p\nmid s\), then

    $$\aleph_{4} = \left\{\!\!\begin{array}{ll} \overline{\eta}(-s)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0~and~\text{Tr}^{m}_{e}(a)=0,\\ \overline{\eta}(-s)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0,~\text{Tr}^{m}_{e}(a)\neq0\text{ and }cs=2\text{Tr}^{m}_{e}(a),\\ \left( \overline{\eta}(2c\text{Tr}^{m}_{e}(a)-sc^{2})p^{e}+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0, ~\text{Tr}^{m}_{e}(a)\neq0\text{ and }cs\neq2\text{Tr}^{m}_{e}(a),\\ -(p^{e}-2)\overline{\eta}(-s)G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\nabla=0~\text{and}~c\text{Tr}^{m}_{e}(a) = \text{Tr}^{m}_{e}(a^{2}),\\ 2\overline{\eta}(-s)G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\nabla = 0~\text{and}~c\text{Tr}^{m}_{e}(a)\neq \text{Tr}^{m}_{e}(a^{2}),\\ \left( \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G},& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\nabla\neq0~\text{and}~\phi(c)=0,\\ \left( \overline{\eta}(\phi(c))p^{e} + \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2})) + \overline{\eta}(\!-s)\right)G\overline{G},\!\!\!& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0,~\nabla\neq0~\text{and}~\phi(c)\neq0. \end{array}\right.$$

Proof

By Lemmas 2.4 and 2.5, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}\left( zx^{2}+(aw+y)x\right)\\ &=&\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\chi_{1}\left( -\frac{(aw+y)^{2}}{4z}\right)\eta(z)G\\ &=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\eta(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \!-\frac{s}{4z}y^{2}-y\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( - \frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2} - \left( \frac{y\text{Tr}^{m}_{e}(a)}{2z} + c\right)w\right).\\ \end{array} $$
(5)

There are the following cases to consider: Case 1: s > 2 is even and ps; Case 2: s > 2 is even and \(p\nmid s \); Case 3: s ≥ 3 is odd and ps; Case 4: s ≥ 3 is odd and \(p\nmid s \).

Case 1: Suppose that s > 2 is even and ps. Then, by (5), we obtain

$$\aleph_{4}=G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2}-\left( \frac{y\text{Tr}^{m}_{e}(a) }{2z}+c\right)w\right).$$

If \( \text {Tr}^{m}_{e}(a^{2})=0 \), then

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{ yw\text{Tr}^{m}_{e}(a)}{2z}\right)\\ &=&\left\{\begin{array}{ll} (p^{e}-1)G,&\text{if}~\text{Tr}^{m}_{e}(a)=0,\\ -G,& \text{if}~\text{Tr}^{m}_{e}(a)\neq0. \end{array}\right. \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and \( \text {Tr}^{m}_{e}(a)=0 \), then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2}-cw\right)\\ &=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\left( \overline{\chi}_{1}\left( \frac{c^{2}z}{\text{Tr}^{m}_{e}(a^{2})}\right)\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{G}-1 \right)\\ &=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\overline{\chi}_{1}\left( \frac{c^{2}z}{\text{Tr}^{m}_{e}(a^{2})}\right)\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)+(p^{e}-1)G\\ &=&-\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G=-G.\end{array} $$

If \(\text {Tr}^{m}_{e}(a^{2})\neq 0\) and \(\text {Tr}^{m}_{e}(a)\neq 0\), then, again from Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2}-\left( \frac{y\text{Tr}^{m}_{e}(a)}{2z}+c\right)w\right)\\ &=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\left( \overline{\chi}_{1}\left( \frac{\left( \text{Tr}^{m}_{e}(a)\right)^{2}}{4z\text{Tr}^{m}_{e}(a^{2}) }y^{2}+\frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}y+\frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\right.\\ &&\times\left.\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{G}-1\right)\\ &=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{\left( \text{Tr}^{m}_{e}(a)\right)^{2}}{4z\text{Tr}^{m}_{e}(a^{2})}y^{2} + \left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})} - 1\right)y\right)\\ &&+(p^{e}-1)G\\ &=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\overline{\chi}_{1}\left( -\frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z+\frac{2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2})}{\left( \text{Tr}^{m}_{e}(a)\right)^{2}}z\right)\\&&\times\overline{\eta}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4z\text{Tr}^{m}_{e}(a^{2}) }\right)\overline{G}-G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)+(p^{e}-1)G\\ &=&\overline{\eta}(-1)G\overline{G}^{2}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2})}{(\text{Tr}^{m}_{e}(a))^{2}}z\right)-\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G\\ &=&\left\{\begin{array}{ll} \overline{\eta}(-1)G\overline{G}^{2}(p^{e}-2)+(p^{e}-1)G,&\text{if}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a)\\ -2\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq 2c\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} (p^{2e}-p^{e}-1)G,&\text{if}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a),\\ -(p^{e}+1)G,& \text{if}~\text{Tr}^{m}_{e}(a^{2})\neq 2c\text{Tr}^{m}_{e}(a). \end{array}\right. \end{array} $$

Case 2: Now, assume that s > 2 is even and \( p\nmid s \). By (5), we obtain

$$\aleph_{4}=G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2}-\left( \frac{y\text{Tr}^{m}_{e}(a) }{2z}+c\right)w\right).$$

If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)=0 \), then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}(-cw)\\ &=&-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\\ &=&-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\left( \overline{\chi}_{1}\left( \frac{z}{s}\right)\overline{\eta}\left( -\frac{s}{4z}\right)\overline{G}-1\right)=-\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G=-G.\allowdisplaybreaks\\ \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-\left( \frac{w\text{Tr}^{m}_{e}(a) }{2z}+1\right)y\right)\\ &=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\left( \overline{\chi}_{1}\left( \frac{z}{s}\left( \frac{w\text{Tr}^{m}_{e}(a) }{2z}+1\right)^{2}\right)\overline{\eta}\left( -\frac{s}{4z}\right)\overline{G}-1\right)\\ &=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{s}{4z}\right)\overline{\chi}_{1}\left( \frac{z}{s}\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4zs}w^{2} + \left( \frac{\text{Tr}^{m}_{e}(a)}{s}-c\right)w\right)+(p^{e}-1)G\\ &=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{s}{4z}\right)\overline{\chi}_{1}\left( \frac{z}{s}\right)\left( \overline{\chi}_{1}\left( \!-\frac{zs}{(\text{Tr}^{m}_{e}(a))^{2}}\left( \frac{\text{Tr}^{m}_{e}(a)}{s} - c\right)^{2}\right)\overline{\eta}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4zs}\right)\overline{G} - 1\right)\\&&+(p^{e}-1)G\\ &=&\overline{\eta}(-1)G\overline{G}^{2}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{2\text{Tr}^{m}_{e}(a)-cs}{(\text{Tr}^{m}_{e}(a))^{2}}cz\right)-\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G\\ &=&\left\{\begin{array}{ll} (p^{e}-2)\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G,&\text{if}~cs=2\text{Tr}^{m}_{e}(a)\\ -2\overline{\eta}(-1)G\overline{G}^{2}+(p^{e}-1)G,&\text{if}~cs\neq2\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} (p^{2e}-p^{e}-1)G,&\text{if}~cs=2\text{Tr}^{m}_{e}(a),\\ -(p^{e}+1)G,&\text{if}~cs\neq2\text{Tr}^{m}_{e}(a). \end{array}\right. \end{array} $$

Recall that \( \nabla =(\text {Tr}^{m}_{e}(a))^{2}-s\text {Tr}^{m}_{e}(a^{2})\). If \(\text {Tr}^{m}_{e}(a^{2})\neq 0\), then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\overline{\chi}_{1}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4z\text{Tr}^{m}_{e}(a^{2})}y^{2}+\frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}y+\frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\\&&\times \overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{G}-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\\ &=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{\nabla}{4z\text{Tr}^{m}_{e}(a^{2})}y^{2} + \left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})} - 1\right)y\right)\\&&-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right). \end{array} $$

Suppose that \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and ∇ = 0. Then

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}-1\right)y\right)-G\\ &=&\left\{\begin{array}{ll} (p^{e}-1)\overline{\eta}(-1)G\overline{G}^{2}-G,&\text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2})\\ -\overline{\eta}(-1)G\overline{G}^{2}-G,&\text{if}~c\text{Tr}^{m}_{e}(a)\neq\text{Tr}^{m}_{e}(a^{2}) \end{array}\right.\\ &=&\left\{\begin{array}{ll} (p^{2e}-p^{e}-1)G,&\text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2}),\\ -(p^{e}+1)G,&\text{if}~c\text{Tr}^{m}_{e}(a)\neq\text{Tr}^{m}_{e}(a^{2}). \end{array}\right. \end{array} $$

Next, we consider that \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and ∇≠ 0. Then, by Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\overline{\chi}_{1}\left( -\frac{z\text{Tr}^{m}_{e}(a^{2}) }{\nabla}\left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}-1\right)^{2}\right)\\ &&\times\overline{\eta}\left( \frac{\nabla}{4z\text{Tr}^{m}_{e}(a^{2}) }\right)\overline{G}-G\overline{G}{\sum}_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)-G\\ &=&G\overline{G}^{2}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(-\nabla)\overline{\chi}_{1}\left( \frac{z}{\nabla}\phi(c)\right)-\overline{\eta}(-1)G\overline{G}^{2}-G\\ &=&G\overline{G}^{2}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(-\nabla)\overline{\chi}_{1}\left( \frac{z}{\nabla}\phi(c)\right)-(p^{e}+1)G, \end{array} $$

where \( \phi (c)=-sc^{2}+2c\text {Tr}^{m}_{e}(a)-\text {Tr}^{m}_{e}(a^{2}) \). From [14, Exercise 5.24], the equation ϕ(c) = 0 over \(\mathbb {F}_{p^{e}}\) has two distinct solutions if and only if \(\overline {\eta }(\nabla )=1\). Thus, when \(\overline {\eta }(\nabla )=1\), we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&\left\{\begin{array}{ll} (p^{e}-1)\overline{\eta}(-1)G\overline{G}^{2}-(p^{e}+1)G,&\text{if}~\phi(c)=0\\ -\overline{\eta}(-1)G\overline{G}^{2}-(p^{e}+1)G,&\text{if}~\phi(c)\neq0 \end{array}\right.\\ &=&\left\{\begin{array}{ll} (p^{2e}-2p^{e}-1)G,&\text{if}~\phi(c)=0,\\ -(2p^{e}+1)G,&\text{if}~\phi(c)\neq0. \end{array}\right. \end{array} $$

Similarly, when \(\overline {\eta }(\nabla )=-1\), we must have ϕ(c)≠ 0 for all \(c\in \mathbb {F}_{p^{e}}^{*}\) and so

$$ \aleph_{4}=\overline{\eta}(-1)G\overline{G}^{2}-(p^{e}+1)G=-G.$$

Case 3: Suppose that s ≥ 3 is odd and ps. Now, by (5), we obtain

$$\aleph_{4}=G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2}-\left( \frac{y\text{Tr}^{m}_{e}(a) }{2z}+c\right)w\right).$$

If \(\text {Tr}^{m}_{e}(a^{2})=0\), then

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\overline{\chi}_{1}\left( -\frac{y\text{Tr}^{m}_{e}(a)}{2z}w\right)\\ &=&\left\{\begin{array}{ll} 0,&\text{if}~\text{Tr}^{m}_{e}(a)=0\\ \overline{\eta}\left( -\frac{c\text{Tr}^{m}_{e}(a)}{2}\right)G\overline{G}^{3},&\text{if}~\text{Tr}^{m}_{e}(a)\neq0 \end{array}\right.\\ &=&\left\{\begin{array}{ll} 0,&\text{if}~\text{Tr}^{m}_{e}(a)=0,\\ \overline{\eta}\left( \frac{c\text{Tr}^{m}_{e}(a)}{2}\right)p^{e}G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a)\neq0. \end{array}\right. \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and \( \text {Tr}^{m}_{e}(a)=0 \), then, from Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2}-cw\right)\\ &=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\left( \overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{G}-1\right)\\ &=&\overline{\eta}\left( -\text{Tr}^{m}_{e}(a^{2})\right)G\overline{G}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-y)\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)=\overline{\eta}\left( -\text{Tr}^{m}_{e}(a^{2})\right)G\overline{G}. \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})\neq 0\) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then, again from Lemma 2.4, we have

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}(-y)\overline{\chi}_{1}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4z\text{Tr}^{m}_{e}(a^{2}) }y^{2} + \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}y + \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{G}\\ &=&\overline{\eta}\left( -\text{Tr}^{m}_{e}(a^{2})\right)G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4z\text{Tr}^{m}_{e}(a^{2}) }y^{2}+\left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}-1\right)y\right)\\ &=&\overline{\eta}\left( -\text{Tr}^{m}_{e}(a^{2})\right)G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\overline{\chi}_{1}\left( -\frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z+\frac{2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2})}{(\text{Tr}^{m}_{e}(a))^{2}}z\right)\\ &&\times \overline{\eta}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4z\text{Tr}^{m}_{e}(a^{2}) }\right)\overline{G}-\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\\ &=&\overline{\eta}(-1)G\overline{G}^{2}{\sum}_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\overline{\chi}_{1}\left( \frac{2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2})}{(\text{Tr}^{m}_{e}(a))^{2}}z\right)+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}\\ &=&\left\{\begin{array}{ll} \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a)\\ \overline{\eta}(-1)\overline{\eta}(2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}^{3}+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})\neq2c\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a),\\ \left( \overline{\eta}(2c\text{Tr}^{m}_{e}(a)-\text{Tr}^{m}_{e}(a^{2}))p^{e}+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))\right)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})\neq2c\text{Tr}^{m}_{e}(a). \end{array}\right. \end{array} $$

Case 4: Suppose that s ≥ 3 is odd and \( p\nmid s \). Now, by (5), we obtain

$$\aleph_{4}=G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}w^{2} - \left( \frac{y\text{Tr}^{m}_{e}(a) }{2z} + c\right)w\right).$$

If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)=0 \), then

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\\ &=&-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\\ &=&-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\left( \overline{\chi}_{1}\left( \frac{z}{s}\right)\overline{\eta}\left( -\frac{s}{4z}\right)\overline{G}-1\right)=\overline{\eta}(-s)G\overline{G}. \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-\left( \frac{w\text{Tr}^{m}_{e}(a)}{2z}+1\right)y\right)\\ &=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\left( \overline{\chi}_{1}\left( \frac{z}{s}\left( \frac{w\text{Tr}^{m}_{e}(a)}{2z}+1\right)^{2}\right)\overline{\eta}\left( -\frac{s}{4z}\right)\overline{G}-1\right)\\ &=&\overline{\eta}(-s)G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{z}{s}\right)\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4zs}w^{2}+\left( \frac{\text{Tr}^{m}_{e}(a)}{s}-c\right)w\right)\\ &=&\overline{\eta}(-s)G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{z}{s}\right)\left( \overline{\chi}_{1}\left( -\frac{zs}{(\text{Tr}^{m}_{e}(a))^{2}}\left( \frac{\text{Tr}^{m}_{e}(a)}{s} - c\right)^{2}\right)\!\overline{\eta}\!\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4zs}\right)\overline{G} - 1\right)\allowdisplaybreaks\\ &=&G\overline{G}^{2}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(-z)\overline{\chi}_{1}\left( \frac{2\text{Tr}^{m}_{e}(a)-cs}{(\text{Tr}^{m}_{e}(a))^{2}}cz\right)+\overline{\eta}(-s)G\overline{G}\\ &=&\left\{\begin{array}{ll} \overline{\eta}(-s)G\overline{G},&\text{if}~cs=2\text{Tr}^{m}_{e}(a)\\ \overline{\eta}(-1)G\overline{G}^{3}\overline{\eta}(2c\text{Tr}^{m}_{e}(a) -sc^{2})+\overline{\eta}(-s)G\overline{G},&\text{if}~cs\neq2\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} \overline{\eta}(-s)G\overline{G},&\text{if}~cs=2\text{Tr}^{m}_{e}(a),\\ \left( \overline{\eta}(2c\text{Tr}^{m}_{e}(a) -sc^{2})p^{e}+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~cs\neq2\text{Tr}^{m}_{e}(a). \end{array}\right. \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \), then we deduce that

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\overline{\chi}_{1}\left( \frac{(\text{Tr}^{m}_{e}(a))^{2}}{4z\text{Tr}^{m}_{e}(a^{2})}y^{2}+\frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}y+\frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\\&&\times \overline{\eta}\left( -\frac{\text{Tr}^{m}_{e}(a^{2})}{4z}\right)\overline{G}-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right)\\ &=&\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{\nabla}{4z\text{Tr}^{m}_{e}(a^{2}) }y^{2}+\left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}-1\right)y\right)\\&&-G\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(z)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( -\frac{s}{4z}y^{2}-y\right). \end{array} $$

If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and ∇ = 0, then \( \overline {\eta }(-\text {Tr}^{m}_{e}(a^{2}))=\overline {\eta }(-s) \) and

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( (\frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}-1)y\right)+\overline{\eta}(-s)G\overline{G}\\ &=&\left\{\begin{array}{ll} \left( -(p^{e}-1)\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2})\\ \left( \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~c\text{Tr}^{m}_{e}(a)\neq\text{Tr}^{m}_{e}(a^{2}) \end{array}\right.\\ &=&\left\{\begin{array}{ll} -(p^{e}-2)\overline{\eta}(-s)G\overline{G},&\text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2}),\\ 2\overline{\eta}(-s)G\overline{G},&\text{if}~c\text{Tr}^{m}_{e}(a)\neq\text{Tr}^{m}_{e}(a^{2}). \end{array}\right. \end{array} $$

Suppose that \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and ∇≠ 0. Recall that \( \phi (c)=-sc^{2}+2c\text {Tr}^{m}_{e}(a) -\text {Tr}^{m}_{e}(a^{2}) \). Then

$$ \begin{array}{@{}rcl@{}} \aleph_{4}&=&\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)\overline{\chi}_{1}\left( -\frac{z\text{Tr}^{m}_{e}(a^{2}) }{\nabla}\left( \frac{c\text{Tr}^{m}_{e}(a)}{\text{Tr}^{m}_{e}(a^{2})}-1\right)^{2}\right)\\&&\times \overline{\eta}\left( \frac{\nabla}{4z\text{Tr}^{m}_{e}(a^{2})}\right)\overline{G}-\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}\left( \frac{c^{2}}{\text{Tr}^{m}_{e}(a^{2})}z\right)+\overline{\eta}(-s)G\overline{G}\\ &=&G\overline{G}^{2}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\overline{\eta}(-z\nabla)\overline{\chi}_{1}\left( \frac{z}{\nabla}\phi(c)\right)+\left( \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G}\\ &=&\left\{\begin{array}{ll} \left( \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~\phi(c)=0,\\ \left( \overline{\eta}(\phi(c))p^{e}+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~\phi(c)\neq0. \end{array}\right. \end{array} $$

This completes the proof of the lemma. □

Lemma 3.5

Suppose that \( \lambda \in \mathbb {F}_{p^{e}}^{*} \) and \( \mu \in \mathbb {F}_{p^{e}}\). For i ∈{1,− 1}, let Ki denote the number of pairs (λ, μ) such that \( \overline {\eta }(\mu ^{2}-s\lambda )=i\). Then

$$K_{i}=\left\{\begin{array}{ll} \frac{1}{2}(p^{e}-1)(p^{e}-2),& \text{if } i=1,\\ \frac{1}{2}(p^{e}-1)p^{e},&\text{if } i=-1. \end{array}\right.$$

Proof

First, we take μ = 0. Then μ2sλ = −sλ, and the number of pairs (λ,0) satisfying \( \overline {\eta }(\mu ^{2}-s\lambda )=i \) is \( \frac {(p^{e}-1)}{2} \). Further, we consider that μ≠ 0. Then, for each pair \((\lambda ,\mu )\in \mathbb {F}_{p^{e}}^{*}\times \mathbb {F}_{p^{e}}^{*}\) and fixed \(s\in \mathbb {F}_{p^{e}}^{*}\), we define a mapping \({\mathscr{L}}\) from \(\mathbb {F}_{p^{e}}^{*}\times \mathbb {F}_{p^{e}}^{*}\) into \(\mathbb {F}_{p^{e}}\) by \({\mathscr{L}}(\lambda ,\mu )=\mu ^{2}-s\lambda \). For each \(c_{0}\in \mathbb {F}_{p^{e}}^{*}\), let

$$\mathcal{A}_{c_{0}}=\{(\lambda,\mu)\in\mathbb{F}_{p^{e}}^{*}\times\mathbb{F}_{p^{e}}^{*}: \mathcal{L}(\lambda,\mu)=c_{0}\}.$$

Set pe = 2h + 1. Now, for a fixed c0 such that \(\overline {\eta }(c_{0})=1\), the number of pairs (λ, μ2) satisfying μ2sλ = c0 is equal to \((0,0)^{(2,p^{e})}+(1,0)^{(2,p^{e})}=h-1~(\text {by Lemma 2.2)}\). Similarly, for a fixed c0 such that \(\overline {\eta }(c_{0})=-1\), the number of pairs (λ, μ2) satisfying μ2sλ = c0 is equal to \((0,1)^{(2,p^{e})}+(1,1)^{(2,p^{e})}=h~(\text {from Lemma 2.2)}\). Consequently, we have

$$ \#\mathcal{A}_{c_{0}}=\left\{\begin{array}{ll} 2(h-1),&\text{ if } \overline{\eta}(c_{0})=1,\\ 2h,&\text{ if } \overline{\eta}(c_{0})=-1. \end{array}\right. $$

We conclude that \(K_{1}=\frac {(p^{e}-1)}{2}+(p^{e}-1)(h-1)\) and \(K_{-1}=\frac {(p^{e}-1)}{2}+(p^{e}-1)h\). Thus, the result is established.□

Lemma 3.6

Suppose that \(\lambda \in \mathbb {F}_{p^{e}}^{*}\), \(\mu \in \mathbb {F}_{p^{e}}\) and μ2sλ≠ 0. For i ∈{1,− 1}, let ψi denote the number of the pairs (λ, μ) such that \(\overline {\eta }(\lambda )=i\). Then

$$\psi_{1}=\left\{\begin{array}{ll} \frac{1}{2}(p^{e}-1)(p^{e}-2),&\text{if}~\overline{\eta}(s)=1,\\ \frac{1}{2}(p^{e}-1)p^{e},&\text{if}~\overline{\eta}(s)=-1, \end{array}\right.$$

and

$$\psi_{-1}=\left\{\begin{array}{ll} \frac{1}{2}(p^{e}-1)p^{e},&\text{if}~\overline{\eta}(s)=1,\\ \frac{1}{2}(p^{e}-1)(p^{e}-2),&\text{if}~\overline{\eta}(s)=-1. \end{array}\right.$$

Proof

Following the arguments similar to the arguments used in the proof of Lemma 3.5, one may easily get the proof of the lemma. So, the proof of the lemma is omitted.□

Let \(c\in \mathbb {F}_{p^{e}}^{*}\) and \(a\in \mathbb {F}_{p^{m}}^{*}\). For a codeword ca of \(\mathcal {C}_{D}\), we denote Nc = Nc(a) to be the number of components \(\text {Tr}^{m}_{e}(ax)\) of ca that are equal to c and n to be the length of ca. So, we have

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\#\{x\in\mathbb{F}_{p^{m}}:\text{Tr}^{m}_{e}(x)=1,\text{Tr}^{m}_{e}(x^{2})=0\text{ and }\text{Tr}^{m}_{e}(ax)=c\}\\ &=&\frac{1}{p^{3e}}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\!\!\!\left( \sum\limits_{y\in \mathbb{F}_{p^{e}}}\!\zeta_{p}^{\text{Tr}^{e}_{1}\left( y(\text{Tr}^{m}_{e}(x)-1)\right)}\right)\!\!\left( \sum\limits_{z\in \mathbb{F}_{p^{e}}}\!\zeta_{p}^{\text{Tr}^{e}_{1}(z\text{Tr}^{m}_{e}(x^{2}))}\right)\!\!\left( \sum\limits_{w\in \mathbb{F}_{p^{e}}}\!\zeta_{p}^{\text{Tr}_{1}^{e}\left( w(\text{Tr}_{e}^{m}(ax)-c)\right)}\right)\\ &=&\frac{n}{p^{e}}+p^{-3e}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}}\zeta_{p}^{\text{Tr}^{e}_{1}\left( y(\text{Tr}^{m}_{e}(x)-1)\right)}\sum\limits_{z\in \mathbb{F}_{p^{e}}}\zeta_{p}^{\text{Tr}^{e}_{1}(z\text{Tr}^{m}_{e}(x^{2}))}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}_{1}^{e}\left( w(\text{Tr}_{e}^{m}(ax)-c)\right)}\\ &=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{1}+\aleph_{2}+\aleph_{3}+\aleph_{4}), \end{array} $$
(6)

where

$$\aleph_{1}=\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}_{1}^{e}\left( w(\text{Tr}_{e}^{m}(ax)-c)\right)}=\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\overline{\chi}_{1}(-cw)\sum\limits_{x\in \mathbb{F}_{p^{m}}}\chi_{1}(awx)=0,$$

and 2, 3 and 4 are defined in Lemmas 3.2, 3.3 and 3.4 respectively. In the upcoming theorems, we have determined Nc for few different cases.

Theorem 3.7

Assume that \( c,c_{0}\in \mathbb {F}_{p^{e}}^{*} \). If 2∣s and ps, then the linear code \( \mathcal {C}_{D} \) defined by (1) has parameters [pm− 2e, s], and its complete weight enumerator is given in Table 1.

Table 1 The complete weight enumerator of the Code \(\mathcal {C}_{D}\) if 2∣s and ps

Proof

From the definition, this code has length n = #D which follows from Lemma 3.1 and dimension s. From (6), we have \( N_{c}=\frac {n}{p^{e}}+p^{-3e}(\aleph _{2}+\aleph _{3}+\aleph _{4}) \), where \( c\in \mathbb {F}_{p^{e}}^{*} \). In this case, the length of the code \( \mathcal {C}_{D} \) is n = pm− 2e.

If \( a\in \mathbb {F}_{p^{e}}^{*} \), then \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)=0 \). Consequently, we have

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{2}+\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-3e}\left( (p^{e}-1)p^{m}-(p^{e}-1)G+(p^{e}-1)G\right),&\text{if}~c=a\\ p^{m-3e}+p^{-3e}\left( -p^{m}-(p^{e}-1)G+(p^{e}-1)G\right),&\text{if}~c\neq a \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-2e},&\text{if}~c=a,\\ 0,&\text{if}~c\neq a. \end{array}\right. \end{array} $$

Each value occurs only once.

Now, suppose that \(a\in \mathbb {F}_{p^{m}}^{*}\setminus \mathbb {F}_{p^{e}}^{*}\). Then 2 = 0. We give the remaining proof in the following cases: Case 1: If \(\text {Tr}^{m}_{e}(a^{2})=\text {Tr}^{m}_{e}(a)=0\), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-3e}\left( -(p^{e}-1)G+(p^{e}-1)G\right)=p^{m-3e}. \end{array} $$

By Lemma 3.1, the frequency is pm− 2e + pe(pe − 1)Gpe as \( a\notin \mathbb {F}_{p^{e}} \). Case 2: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and \( \text {Tr}^{m}_{e}(a)=0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-3e}(G-G)=p^{m-3e}. \end{array} $$

By Lemma 3.1, the frequency is (pe − 1)(pm− 2epeG). Hence, we conclude from last two cases that Nc = pm− 3e occurs pmepe times. Case 3: If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-3e}\left( -(p^{e}-1)G-G\right)=p^{m-3e}-p^{-2e}G. \end{array} $$

It follows from Lemma 3.1 that this value occurs (pe − 1)pm− 2e times. Case 4: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0\) and \(\text {Tr}^{m}_{e}(a)\neq 0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-3e}\left( 1+(p^{2e}-p^{e}-1)\right)G,&\text{if}~\text{Tr}^{m}_{e}(a^{2})=2c\text{Tr}^{m}_{e}(a)\\ p^{m-3e}+p^{-3e}\left( 1-(p^{e}+1)\right)G,&\text{if}~\text{Tr}^{m}_{e}(a^{2})\neq2c\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}(p^{e}-1)G,&\text{if}~c=c_{0},\\ p^{m-3e}-p^{-2e}G,&\text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

where \( c_{0}=\frac {\text {Tr}^{m}_{e}(a^{2})}{2\text {Tr}^{m}_{e}(a)}\in \mathbb {F}_{p^{e}}^{*} \). By Lemma 3.1, the frequency is (pe − 1)pm− 2e. This completes the proof of the theorem.□

Corollary 3.8

If 2∣s and ps, then the weight distribution of the linear code \( \mathcal {C}_{D} \) defined by (1) is given in Table 2.

Table 2 The weight distribution of \( \mathcal {C}_{D} \) if 2∣s and ps

Example 3.9

Let (p, m, s, e) = (3,12,6,2). Then, by Theorem 3.7, the code \(\mathcal {C}_{D}\) is a [6561,6,5823] linear code. Its complete weight enumerator and weight enumerator are

$$\sum\limits_{i=0}^{8}w_{i}^{6561}+59040\prod\limits_{j=0}^{8}w_{j}^{729}+52488\sum\limits_{i=0}^{8}\left( w_{i}^{657}\prod\limits_{j\neq i}w_{j}^{738}\right)(0\leq j\leq8)$$

and 1 + 419904x5823 + 59040x5832 + 52488x5904 + 8x6561 respectively.

Theorem 3.10

Assume that \( c\in \mathbb {F}_{p^{e}}^{*} \). If 2∣s and \( p\nmid s \), then the linear code \( \mathcal {C}_{D} \) defined by (1) has parameters [n, s], where

$$n=p^{m-2e}-(-1)^{\frac{(p-1)^{2}m}{8}}p^{\frac{m-2e}{2}}.$$

Its complete weight enumerator is given in Table 3.

Table 3 The complete weight enumerator of the Code \(\mathcal {C}_{D}\) if 2∣s and \(p\nmid s\)

Proof

This code has length n = #D which follows from Lemma 3.1 and dimension s. For \( c\in \mathbb {F}_{p^{e}}^{*} \), recall from (6) that \( N_{c}=\frac {n}{p^{e}}+p^{-3e}(\aleph _{2}+\aleph _{3}+\aleph _{4})\). We now consider the case that 2∣s and \( p\nmid s \). In this case the length n of the code \( \mathcal {C}_{D} \) is pm− 2e + peG.

If \( a\in \mathbb {F}_{p^{e}}^{*} \), then \( \text {Tr}^{m}_{e}(a^{2})=a^{2}s\neq 0 \) and \( \text {Tr}^{m}_{e}(a)=as\neq 0 \). Consequently, \( \nabla =(\text {Tr}^{m}_{e}(a))^{2}-s\text {Tr}^{m}_{e}(a^{2})=0 \) and

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{2}+\aleph_{3}+\aleph_{4})\\ N_{c}&=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}G+p^{-3e}\left( (p^{e}-1)p^{m}+G+(p^{2e}-p^{e}-1)G\right),&\text{if}~c=a\\ p^{m-3e}+p^{-2e}G+p^{-3e}\left( -p^{m}+G-(p^{e}+1)G\right),&\text{if}~c\neq a \end{array}\right.\\ N_{c}&=&\left\{\begin{array}{ll} p^{m-2e}+p^{-e}G,&\text{if}~c=a,\\ 0,&\text{if}~c\neq a. \end{array}\right. \end{array} $$

Moreover, each value occurs only once.

Suppose that \( a\in \mathbb {F}_{p^{m}}^{*}\setminus \mathbb {F}_{p^{e}}^{*} \). Under this assumption, we have 2 = 0. We give the remaining proof in the following cases: Case 1: If \( \text {Tr}^{m}_{e}(a^{2})=\text {Tr}^{m}_{e}(a)=0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-2e}G+p^{-3e}\left( -(p^{e}-1)G-G\right)=p^{m-3e}. \end{array} $$

By Lemma 3.1, the frequency is pm− 2e − 1 as a≠ 0. Case 2: If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}G+p^{-3e}\left( -(p^{e}-1)G+(p^{2e}-p^{e}-1)G\right),& \text{if}~cs=2\text{Tr}^{m}_{e}(a)\\ p^{m-3e}+p^{-2e}G+p^{-3e}\left( -(p^{e}-1)G-(p^{e}+1)G\right),& \text{if}~cs\neq2\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}(p^{e}-1)G,&\text{if}~c=c_{0},\\ p^{m-3e}-p^{-2e}G,&\text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

where \( c_{0}=\frac {2\text {Tr}^{m}_{e}(a)}{s}\in \mathbb {F}_{p^{e}}^{*} \). By Lemma 3.1, the frequency is pm− 2e + peG. Case 3: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and ∇ = 0, then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}G+p^{-3e}\left( G+(p^{2e}-p^{e}-1)G\right),& \text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2})\\ p^{m-3e}+p^{-2e}G+p^{-3e}\left( G-(p^{e}+1)G\right),& \text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2}) \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-e}G,&\text{if}~c=c_{0},\\ p^{m-3e},&\text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

where \(c_{o}=\frac {\text {Tr}^{m}_{e}(a^{2})}{\text {Tr}^{m}_{e}(a)}=\frac {\text {Tr}^{m}_{e}(a)}{s}\in \mathbb {F}_{p^{e}}^{*} \) since ∇ = 0. By Lemma 3.1, the frequency is pm− 2e − 1. Case 4: If \(\text {Tr}^{m}_{e}(a^{2})\neq 0\) and \(\overline {\eta }(\nabla )=1\), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}G+p^{-3e}\left( G+(p^{2e}-2p^{e}-1)G\right),&\text{if}~\phi(c)=0\\ p^{m-3e}+p^{-2e}G+p^{-3e}\left( G-(2p^{e}+1)G\right),&\text{if}~\phi(c)\neq0 \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-2e}(p^{e}-1)G,&\text{if}~c=c_{0},c_{1},\\ p^{m-3e}-p^{-2e}G,&\text{if}~c\neq c_{0},c_{1}, \end{array}\right. \end{array} $$

where c0, c1 are two distinct roots of the equation \(\phi (c)=-sc^{2}+2c\text {Tr}^{m}_{e}(a)-\text {Tr}^{m}_{e}(a^{2})=0\), since \(\overline {\eta }(\nabla )=1\). By Lemmas 3.1 and 3.5, the frequency is pm− 2e + peG. Case 5: If \(\text {Tr}^{m}_{e}(a^{2})\neq 0\) and \(\overline {\eta }(\nabla )=-1\), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-2e}G+p^{-3e}(G-G)\\ &=&p^{m-3e}+p^{-2e}G. \end{array} $$

By Lemmas 3.1 and 3.5, the frequency is \(\frac {1}{2}(p^{e}-1)(p^{m-e}-G)\). Thus, the result is established.□

Corollary 3.11

If 2∣s and \( p\nmid s \), then the weight distribution of the linear code \( \mathcal {C}_{D} \) defined by (1) is given in Table 4.

Table 4 The weight distribution of \( \mathcal {C}_{D} \) if 2∣s and \( p\nmid s\)

Example 3.12

Let (p, m, s, e) = (3,8,4,2). Then, by Theorem 3.10, the code \(\mathcal {C}_{D}\) is a [72,4,62] linear code. Its complete weight enumerator and weight enumerator are

$$ \begin{array}{@{}rcl@{}} &&\sum\limits_{i=0}^{8}w_{i}^{72}+80\prod\limits_{j=1}^{8}{w_{j}^{9}}+3240\prod\limits_{k=0}^{8}{w_{k}^{8}}+80{w_{0}^{9}}\sum\limits_{i=1}^{8}\prod\limits_{j\neq i}{w_{j}^{9}} ~(1\leq j\leq8)\\&&~~~~~~+72w_{0}\sum\limits_{j=1}^{8}w_{j}\left( \prod\limits_{k\neq j}w_{k}^{10}\right)(1\leq k\leq8)\\&&~~~~~~+72w_{0}^{10}\sum\limits_{i=1 }^{8}w_{i}\sum\limits_{j>i}w_{j}\left( \prod\limits_{k\neq j,i}w_{k}^{10}\right)(1\leq j, k\leq8) \end{array} $$

and 1 + 2016x62 + 640x63 + 3240x64 + 576x71 + 88x72 respectively.

Remark 3.13

Consider the linear codes [81,6,48] and [71,5,42] obtained in [22] and [13] respectively. Then one can see that our code illustrated in the previous example has improved relative minimum distance.

Theorem 3.14

Assume that \( c\in \mathbb {F}_{p^{e}}^{*} \). If \( 2\nmid s \) and ps, then the linear code \( \mathcal {C}_{D} \) defined by (1) has parameters [pm− 2e, s]. Its complete weight enumerator is given in Table 5.

Table 5 The complete weight enumerator of the Code \(\mathcal {C}_{D}\) if \(2\nmid s\) and ps

Proof

Now consider that \( 2\nmid s \) and ps. In this case the length of the code \( \mathcal {C}_{D} \) is n = pm− 2e.

If \( a\in \mathbb {F}_{p^{e}}^{*} \), then \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)=0 \). Consequently, by (6), we have

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{2}+\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e}+p^{-3e}(p^{e}-1)p^{m},&\text{if}~c=a\\ p^{m-3e}+p^{-3e}(-p^{m}),&\text{if}~c\neq a \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-2e},&\text{if}~c=a,\\ 0,&\text{if}~c\neq a. \end{array}\right. \end{array} $$

Each value occurs only once.

Suppose that \( a\in \mathbb {F}_{p^{m}}^{*}\setminus \mathbb {F}_{p^{e}}^{*} \). Under this assumption, we have 2 = 0. We give the remaining proof in the following cases: Case 1: If \( \text {Tr}^{m}_{e}(a^{2})=\text {Tr}^{m}_{e}(a)=0 \), then

$$N_{c}=\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})=p^{m-3e}.$$

By Lemma 3.1, the frequency is pm− 2epe as \( a\notin \mathbb {F}_{p^{e}} \). Case 2: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and \( \text {Tr}^{m}_{e}(a)=0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-3e}(-\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2})))G\overline{G}=p^{m-3e}. \end{array} $$

By Lemma 3.1, the frequency is (pe − 1)pm− 2e. Hence, we conclude from the last two cases that Nc = pm− 3e occurs pmepe times. Case 3: If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-2e}\overline{\eta}\left( \frac{c\text{Tr}^{m}_{e}(a)}{2}\right)G\overline{G}, \end{array} $$

from which it follows that \( N_{c}=p^{m-3e}+p^{-2e}\overline {\eta }(c)G\overline {G} \) or \( N_{c}=p^{m-3e}-p^{-2e}\overline {\eta }(c)G\overline {G} \). According to Lemma 3.1, the frequency of each value is \( \frac {1}{2}(p^{e}-1)p^{m-2e} \). Case 4: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \), \(\text {Tr}^{m}_{e}(a)\neq 0 \) and \(\text {Tr}^{m}_{e}(a^{2})=2c\text {Tr}^{m}_{e}(a)\), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-3e}\left( -\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))\right)G\overline{G}=p^{m-3e}. \end{array} $$

Case 5: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \), \(\text {Tr}^{m}_{e}(a)\neq 0 \) and \(\text {Tr}^{m}_{e}(a^{2})\neq 2c\text {Tr}^{m}_{e}(a)\), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}+p^{-3e}\left( -\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}\left( 2c\text{Tr}^{m}_{e}(a) - \text{Tr}^{m}_{e}(a^{2})\right)p^{e} + \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))\right)G\overline{G}. \end{array} $$

So, one can easily combine the last two cases as

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\left\{\begin{array}{ll} p^{m-3e},&\text{if}~c=c_{0},\\ p^{m-3e}+p^{-2e}\overline{\eta}(2\text{Tr}^{m}_{e}(a))\overline{\eta}(c-c_{0})G\overline{G},&\text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

where \( c_{0}=\frac {\text {Tr}^{m}_{e}(a^{2})}{2\text {Tr}^{m}_{e}(a)}\in \mathbb {F}_{p^{e}}^{*} \). This concludes that

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\left\{\begin{array}{ll} p^{m-3e},&\text{if}~c=c_{0},\\ p^{m-3e}+p^{-2e}\overline{\eta}(c-c_{0})G\overline{G},&\text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

or

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\left\{\begin{array}{ll} p^{m-3e},&\text{if}~c=c_{0},\\ p^{m-3e}-p^{-2e}\overline{\eta}(c-c_{0})G\overline{G},&\text{if}~c\neq c_{0}. \end{array}\right. \end{array} $$

By Lemma 3.1, the frequency is \( \frac {1}{2}(p^{e}-1)p^{m-2e} \). Thus, the result is established.□

Corollary 3.15

If \( 2\nmid s \) and ps, then the weight distribution of the linear code \( \mathcal {C}_{D} \) defined by (1) is given in the following Table 6.

Table 6 The weight distribution of \( \mathcal {C}_{D} \) if \( 2\nmid s \) and ps

Proof

The result can be extracted from the complete weight enumerator as shown in the last Theorem 3.14, by observing that

$$\sum\limits_{c\in\mathbb{F}_{p^{e}}^{*}}\overline{\eta}(c-c_{0})=\sum\limits_{c\in\mathbb{F}_{p^{e}}}\overline{\eta}(c-c_{0})-\overline{\eta}(-c_{0})=-\overline{\eta}(-c_{0}),$$

where \(c_{0}\in \mathbb {F}_{p^{e}}^{*}\). □

Example 3.16

Let (p, m, s, e) = (3,6,3,2). Then, by Theorem 3.14, the code \(\mathcal {C}_{D}\) is a [9,3,7] linear code, which is a MDS code. Let \(\mathbb {F}_{9}=\{w_{0},w_{1}\ldots ,w_{8}\}\). If w2, w4, w6 and w8 are square elements in \(\mathbb {F}_{9}^{*}\), then its complete weight enumerator is

$$ \begin{array}{@{}rcl@{}} &&\sum\limits_{i=0}^{8}{w_{i}^{9}}+72\prod\limits_{j=0}^{8}w_{j}+36(w_{1}w_{3}w_{5}w_{7})^{2}w_{0}+36(w_{2}w_{4}w_{6}w_{8})^{2}w_{0}+36(w_{2}w_{4}w_{6}w_{8})^{2}\\&&\times(w_{1}+w_{3}+w_{5}+w_{7}) + 36(w_{1}w_{3}w_{5}w_{7})^{2}(w_{2} + w_{4} + w_{6}+w_{8})+36w_{2}(w_{4}w_{6}w_{8})^{2}{w_{0}^{2}}\\&&+36w_{4}(w_{2}w_{6}w_{8})^{2}{w_{0}^{2}} + 36w_{6}(w_{2}w_{4}w_{8})^{2}{w_{0}^{2}} + 36w_{8}(w_{2}w_{4}w_{6})^{2}{w_{0}^{2}} + 36w_{1}(w_{3}w_{5}w_{7})^{2}{w_{0}^{2}}\\&&+36w_{3}(w_{1}w_{5}w_{7})^{2}{w_{0}^{2}}+36w_{5}(w_{1}w_{3}w_{7})^{2}{w_{0}^{2}}+36w_{7}(w_{1}w_{3}w_{5})^{2}{w_{0}^{2}} \end{array} $$

while its weight enumerator is 1 + 288x7 + 144x8 + 296x9.

Theorem 3.17

Assume that \( c\in \mathbb {F}_{p^{e}}^{*} \). If \( 2\nmid s \) and \( p\nmid s \), then the linear code \( \mathcal {C}_{D} \) defined by (1) has parameters [pm− 2eK, s], where

$$K=\overline{\eta}(-s)(-1)^{m+e-2}(-1)^{\frac{(p-1)^{2}(m+e)}{8}}p^{\frac{m-3e}{2}}.$$

Its complete weight enumerator is given in Table 7, where ∇ runs through \(\mathbb {F}_{p^{e}}^{*}\) such that \(\overline {\eta }(-\nabla )=-1\).

Table 7 The complete weight enumerator of the Code \(\mathcal {C}_{D}\) if \(2\nmid s\) and \(p\nmid s\)

Proof

Consider the case that \( 2\nmid s \) and \( p\nmid s \). In this case, the length of the code \( \mathcal {C}_{D} \) is \( n=p^{m-2e}-\overline {\eta }(-s)p^{-2e}G\overline {G} \).

If \( a\in \mathbb {F}_{p^{e}}^{*} \), then \( \text {Tr}^{m}_{e}(a^{2})=a^{2}s\neq 0 \) and \( \text {Tr}^{m}_{e}(a)=as\neq 0 \). Consequently, \( \nabla =(\text {Tr}^{m}_{e}(a))^{2}-s\text {Tr}^{m}_{e}(a^{2}) =0\) and \( \overline {\eta }(-\text {Tr}^{m}_{e}(a^{2}))=\overline {\eta }(-s)\). Thus

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{2}+\aleph_{3}+\aleph_{4})\\ N_{c}&=&\left\{\begin{array}{ll} p^{-e}n+p^{-3e}\left( (p^{e}-1)p^{m}-(p^{e}-1)\overline{\eta}(-s)G\overline{G}\right),&\text{if}~c=a\\ p^{-e}n+p^{-3e}\left( -p^{m}+\overline{\eta}(-s)G\overline{G}\right),&\text{if}~c\neq a \end{array}\right.\\ N_{c}&=&\left\{\begin{array}{ll} n,&\text{if}~c=a,\\ 0,&\text{if}~c\neq a. \end{array}\right. \end{array} $$

Each value occurs only once.

Suppose that \( a\in \mathbb {F}_{p^{m}}^{*}\setminus \mathbb {F}_{p^{e}}^{*} \). Under this assumption 2 = 0. The remaining proof is given in the following cases: Case 1: If \( \text {Tr}^{m}_{e}(a^{2})=\text {Tr}^{m}_{e}(a)=0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&p^{m-3e}-p^{-3e}\overline{\eta}(-s)G\overline{G}+p^{-3e}\overline{\eta}(-s)G\overline{G}=p^{m-3e}. \end{array} $$

By Lemma 3.1, the frequency is \( p^{m-2e}+p^{-2e}\overline {\eta }(-s)(p^{e}-1)G\overline {G}-1 \). Case 2: If \( \text {Tr}^{m}_{e}(a^{2})=0 \) and \( \text {Tr}^{m}_{e}(a)\neq 0 \), then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{m-3e},& \text{if}~cs=2\text{Tr}^{m}_{e}(a)\\ p^{m-3e}+p^{-2e}\overline{\eta}(2c\text{Tr}^{m}_{e}(a)-c^{2}s)G\overline{G},& \text{if}~cs\neq2\text{Tr}^{m}_{e}(a) \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e},& \text{if}~c=c_{0},\\ p^{m-3e}+p^{-2e}\overline{\eta}(-s)\overline{\eta}(c^{2}-cc_{0})G\overline{G},& \text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

where \( c_{0}=\frac {2\text {Tr}^{m}_{e}(a)}{s}\in \mathbb {F}_{p^{e}}^{*} \). By Lemma 3.1, the frequency is n. Case 3: If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and ∇ = 0, then \( \overline {\eta }(-\text {Tr}^{m}_{e}(a^{2}))=\overline {\eta }(-s) \). Consequently, we have

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{-e}n+p^{-3e}\left( -1-(p^{e}-2)\right)\overline{\eta}(-s)G\overline{G},& \text{if}~c\text{Tr}^{m}_{e}(a)=\text{Tr}^{m}_{e}(a^{2})\\ p^{-e}n+p^{-3e}(-1+2)\overline{\eta}(-s)G\overline{G},& \text{if}~c\text{Tr}^{m}_{e}(a)\neq\text{Tr}^{m}_{e}(a^{2}) \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e}-p^{-2e}\overline{\eta}(-s)G\overline{G},&\text{if}~c=c_{0},\\ p^{m-3e},&\text{if}~c\neq c_{0}, \end{array}\right. \end{array} $$

where \(c_{o}=\frac {\text {Tr}^{m}_{e}(a)}{s}\in \mathbb {F}_{p^{e}}^{*} \) since ∇ = 0. One may easily find, by Lemma 3.1, that the frequency is \( p^{m-2e}+\overline {\eta }(-s)(p^{e}-1)p^{-2e}G\overline {G}-1\). Case 4: If \(\text {Tr}^{m}_{e}(a^{2})\neq 0\) and ∇≠ 0, then

$$ \begin{array}{@{}rcl@{}} N_{c}&=&\frac{n}{p^{e}}+p^{-3e}(\aleph_{3}+\aleph_{4})\\ &=&\left\{\begin{array}{ll} p^{-e}n+p^{-3e}\overline{\eta}(-s)G\overline{G},&\text{if}~\phi(c)=0\\ p^{-e}n+p^{-3e}\left( p^{e}\overline{\eta}(\phi(c))+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~\phi(c)\neq0 \end{array}\right.\\ &=&\left\{\begin{array}{ll} p^{m-3e},&\text{if}~\phi(c)=0,\\ p^{m-3e}+p^{-2e}\overline{\eta}(\phi(c))G\overline{G},&\text{if}~\phi(c)\neq0, \end{array}\right. \end{array} $$

where \( \phi (c)=-sc^{2}+2c\text {Tr}^{m}_{e}(a)-\text {Tr}^{m}_{e}(a^{2})\). This case is divided into the following two subcases. Case 4(a): If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and \( \overline {\eta }(\nabla )=1 \), then the equation ϕ(c) = 0 must have two distinct roots. Let c0 and c1 be the distinct roots of ϕ(c). Then ϕ(c) can be represented as ϕ(c) = −s(cc0)(cc1). Therefore, we have

$$N_{c}=\left\{\begin{array}{ll} p^{m-3e},&\text{if}~c=c_{0},c_{1},\\ p^{m-3e}+p^{-2e}\overline{\eta}(-s)\overline{\eta}(c-c_{0})\overline{\eta}(c-c_{1})G\overline{G},&\text{if}~c\neq c_{0},c_{1}. \end{array}\right.$$

By Lemma 3.1, the frequency is n. Moreover, by Lemma 3.5, there are \( \frac {1}{2}(p^{e}-1)(p^{e}-2) \) such values. Case 4(b): If \( \text {Tr}^{m}_{e}(a^{2})\neq 0 \) and \(\overline {\eta }(\nabla )=-1\), then

$$N_{c}=p^{m-3e}+p^{-2e}\overline{\eta}(\phi(c))G\overline{G}.$$

More precisely, by writing \( \phi (c)=-s\left (c-\frac {\text {Tr}^{m}_{e}(a)}{s}\right )^{2}+\frac {\nabla }{s} \), we deduce that

$$N_{c}=\left\{\begin{array}{ll} p^{m-3e}-p^{-2e}\overline{\eta}(s)G\overline{G},&\text{if}~c=c_{0},\\ p^{m-3e}+p^{-2e}\overline{\eta}(-s)\overline{\eta}\left( s^{2}(c-c_{0})^{2}-\nabla\right)G\overline{G},&\text{if}~c\neq c_{0}, \end{array}\right. $$

where \( c_{o}=\frac {\text {Tr}^{m}_{e}(a)}{s} \) and \( \text {Tr}^{m}_{e}(a)\neq 0\). The number of such values is \( \frac {1}{2}(p^{e}-1)^{2} \). On the other hand if \( \text {Tr}^{m}_{e}(a)=0 \), then

$$ N_{c}=p^{m-3e}+p^{-2e}\overline{\eta}(-s)\overline{\eta}(s^{2}c^{2}-\nabla)G\overline{G}.$$

The number of such values is \( \frac {1}{2}(p^{e}-1) \). Again, from Lemma 3.1, each value occurs n times. Thus, we have the desired result. □

Corollary 3.18

If \( 2\nmid s \) and \( p\nmid s \), then the weight distribution of the linear code \( \mathcal {C}_{D} \) defined by (1) is given in Table 8, where

$$w=(-1)^{m+e-2}(-1)^{\frac{(p-1)^{2}(m+e)}{8}}p^{\frac{m-3e}{2}},$$
$$f_{4}=\left\{\begin{array}{ll} \frac{1}{2}(p^{e}-1)(p^{e}-2)(p^{m-2e}-\overline{\eta}(-s)w),&\text{if}~\overline{\eta}(s)=1,\\ \frac{1}{2}p^{e}(p^{e}-1)(p^{m-2e}-\overline{\eta}(-s)w),&\text{if}~\overline{\eta}(s)=-1; \end{array}\right.$$
$$f_{5}=\left\{\begin{array}{ll} \frac{1}{2}p^{e}(p^{e}-1)(p^{m-2e}-\overline{\eta}(-s)w),&\text{if}~\overline{\eta}(s)=1,\\ \frac{1}{2}(p^{e}-1)(p^{e}-2)(p^{m-2e}-\overline{\eta}(-s)w),&\text{if}~\overline{\eta}(s)=-1. \end{array}\right.$$
Table 8 The weight distribution of \( \mathcal {C}_{D} \) if \( 2\nmid s \) and \( p\nmid s \)

Proof

For \(a\in \mathbb {F}_{p^{m}}^{*}\), define \(N_{0}=\#\{x\in \mathbb {F}_{p^{m}}:\text {Tr}^{m}_{e}(x)=1,\text {Tr}^{m}_{e}(x^{2})=0 \text { and }\text {Tr}^{m}_{e}(ax)=0\}\). For given n the length of \(\mathcal {C}_{D}\), the Hamming weight of a codeword ca is given by

$$ \text{wt}(\textbf{c}_{a})=n-N_{0}, $$
(7)

In the same manner, as in (6), we can find that

$$ N_{0}=\frac{n}{p^{e}}+p^{-3e}(\overline{\aleph}_{1}+\overline{\aleph}_{2}+\overline{\aleph}_{3}+\overline{\aleph}_{4}), $$
(8)

where

$$ \begin{array}{@{}rcl@{}} \overline{\aleph}_{1}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}_{1}^{e}(w\text{Tr}_{e}^{m}(ax))}=\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\sum\limits_{x\in \mathbb{F}_{p^{m}}}\zeta_{p}^{\text{Tr}^{m}_{1}(awx)}=0,\\ \overline{\aleph}_{2}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}^{e}_{1}\left( y(\text{Tr}^{m}_{e}(x)-1)\right)}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}_{1}^{e}(w\text{Tr}_{e}^{m}(ax))},\\ \overline{\aleph}_{3}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}^{e}_{1}(z\text{Tr}^{m}_{e}(x^{2}))}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}_{1}^{e}(w\text{Tr}_{e}^{m}(ax))},\\ \overline{\aleph}_{4}&=&\sum\limits_{x\in \mathbb{F}_{p^{m}}}\sum\limits_{y\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}^{e}_{1}\left( y(\text{Tr}^{m}_{e}(x)-1)\right)}\sum\limits_{z\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}^{e}_{1}(z\text{Tr}^{m}_{e}(x^{2}))}\sum\limits_{w\in \mathbb{F}_{p^{e}}^{*}}\zeta_{p}^{\text{Tr}_{1}^{e}(w\text{Tr}_{e}^{m}(ax))}. \end{array} $$

Let \(2\nmid s\) and \(p\nmid s\). Then, by following the arguments similar to the arguments used in the proofs of Lemmas 3.2, 3.3 and 3.4, one may easily get that

$$ \begin{array}{@{}rcl@{}} \overline{\aleph}_{2}&=&\left\{\begin{array}{ll} -p^{m},& \text{if}~a\in\mathbb{F}_{p^{e}}^{*},\\ 0,&\text{otherwise}; \end{array}\right.\\ \overline{\aleph}_{3}&=&\left\{\begin{array}{ll} 0,&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0,\\ (p^{e}-1)\overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0; \end{array}\right.\\ \overline{\aleph}_{4}&=&\left\{\begin{array}{ll} -(p^{e}-1)\overline{\eta}(-s)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0~\text{and}~\text{Tr}^{m}_{e}(a)=0,\\ \overline{\eta}(-s)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})=0~\text{and}~\text{Tr}^{m}_{e}(a)\neq0,\\ -(p^{e}-2)\overline{\eta}(-s)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0~\text{and}~\nabla=0,\\ \left( \overline{\eta}(-\text{Tr}^{m}_{e}(a^{2}))+\overline{\eta}(-s)\right)G\overline{G},&\text{if}~\text{Tr}^{m}_{e}(a^{2})\neq0~\text{and}~\nabla\neq0. \end{array}\right. \end{array} $$

The result is directly follows from (7), (8) and Lemmas 3.1 and 3.6.□

Remark 3.19

If \(b\in \mathbb {F}_{p^{e}}^{*}\) is fixed and \(D_{b}=\{x\in \mathbb {F}_{p^{m}}: \text {Tr}^{m}_{e}(x)=b \text { and } \text {Tr}^{m}_{e}(x^{2})=0\},\) then we get the code \(\mathcal {C}_{D_{b}}\) of the form (1). Now, define a mapping fb : D1Db by

$$f_{b}(x)=bx.$$

This implies that the code \(\mathcal {C}_{D_{b}}\) is equal to \(\mathcal {C}_{D_{1}}\). So, Theorems 3.7, 3.10, 3.14 and 3.17 actually demonstrate the complete weight enumerators of \(\mathcal {C}_{D_{b}}\) for all \(b\in \mathbb {F}_{p^{e}}^{*}\).

Corollary 3.20

Let \(\mathcal {C}_{D}\) be the linear code defined by (1). Then \(\mathcal {C}_{D}\) is optimal with respect to the Griesmer bound only if s = 3. If s = p = 3, then it is MDS and it has parameters [3e,3,3e − 2]. Moreover, for s = 3 and p > 3, it has parameters [pe + 1,3,pe − 1] if \(\overline {\eta }(-3)=-1\) and [pe − 1,3,pe − 3] if \(\overline {\eta }(-3)=1\).

Proof

If \(2\nmid s\) and ps, then it directly follows from Corollary 3.15 that \(\mathcal {C}_{D}\) has parameters \([p^{m-2e}, s, (p^{e}-1)p^{m-3e}-p^{\frac {m-3e}{2}}]\). Suppose that \(s=2s^{\prime }+1\), where \(s=\frac {m}{e}\) and \(s^{\prime }\geq 1\). Then we have

$$\sum\limits_{i=0}^{s-1}\left\lceil\frac{d}{p^{ei}}\right\rceil=p^{e(2s^{\prime}-1)}-p^{e(s^{\prime}-1)}+1-\frac{p^{e(s^{\prime}-1)}-1}{p^{e}-1}.$$

By the equation

$$p^{e(2s^{\prime}-1)}-p^{e(s^{\prime}-1)}+1-\frac{p^{e(s^{\prime}-1)}-1}{p^{e}-1}=p^{e(2s^{\prime}-1)},$$

we have \(s^{\prime }=1\) whence s = 3. Since ps, we must have p = 3. Thus, for p = s = 3, the code \(\mathcal {C}_{D}\) is MDS with parameters [3e,3,3e − 2].

Now, we suppose that \(2\nmid s\), \(p\nmid s\) and \(\overline {\eta }(-s)^{m+e-2}(-1)^{\frac {(p-1)^{2}(m+e)}{8}}=-1\). From Corollary 3.18, the code \(\mathcal {C}_{D}\) has parameters \([p^{m-2e}+p^{\frac {m-3e}{2}}, s, (p^{e}-1)p^{m-3e}]\). Thus

$$\sum\limits_{i=0}^{s-1}\left\lceil\frac{d}{p^{ei}}\right\rceil=p^{e(s-2)}+1.$$

Hence, the equation \(p^{e(s-2)}+1=p^{e(s-2)}+p^{\frac {e(s-3)}{2}}\) gives that s = 3. Consequently, we have \(\overline {\eta }(-3)=-1\). Therefore, the code \(\mathcal {C}_{D}\) is MDS with parameters [pe + 1,3,pe − 1].

Further, consider that \(2\nmid s\), \(p\nmid s\) and \(\overline {\eta }(-s)^{m+e-2}(-1)^{\frac {(p-1)^{2}(m+e)}{8}}=1\). In the same manner, we can show that \(\mathcal {C}_{D}\) is MDS with parameters [pe − 1,3,pe − 3] when s = 3 and \(\overline {\eta }(-3)=1\). Other cases may similarly be verified.

Thus, it follows from Lemma 2.6 that the code \(\mathcal {C}_{D}\) is optimal achieving the Griesmer bound provided that s = 3. □

It is well known that error-correcting capability of a linear code \(\mathcal {C}=[n, k, d]\) depends on the relative minimun distance \(\delta (\mathcal {C})\)(see [15]). A linear code \(\mathcal {C}\) is MDS if and only if \(\delta (\mathcal {C})+\mathcal {R}(\mathcal {C})=1\), where \(\mathcal {R}(\mathcal {C})\) is the transmission rate of \(\mathcal {C}\). The Remark 3.21 and Tables 9 and 10 conclude that codes determined in this paper have improved error-correcting capability and more close to MDS codes than the codes in [22].

Table 9 Characterization of the linear codes obtained in [22]
Table 10 Characterization of the linear codes obtained in the present paper

In the Table 10, ∗ shows that the complete weight enumerator of the code is not inlcluded in the present paper due to large presentation.

Remark 3.21

The MDS code [3,3,1], which is unique, obtained in [22] has zero relative minimum distance while our MDS codes [3e,3,3e − 2] have nonzero relative minimum distance for every e ≥ 2. In addition, it can easily be checked that

$$ \frac{p^{e}-2}{p^{e}+1}>\frac{p-2}{p+1} \text{ and } \frac{p^{e}-4}{p^{e}-1}>\frac{p-4}{p-1} \text{ for all } e\geq 2. $$

Hence, one can conclude that our MDS codes have better error-correcting capability than the MDS codes in Corollary 2 of [22].

3.2 The dual code of the code \(\mathcal {C}_{D}\)

In this subsection, we study the dual code of the code \(\mathcal {C}_{D}\). In the following theorem, we have determined bounds on the minimum distance of the dual code.

Theorem 3.22

Let the symbols have the same meanings as before, and let d denote the minimum distance of the dual code \(\mathcal {C}_{D}^{\perp }\) of the code \(\mathcal {C}_{D}\) defined in (1). Then

  1. 1.

    if 2∣s and ps, we have 3 ≤ d≤ 4.

  2. 2.

    if 2∣s, \(p\nmid s\) and e ≥ 2, we have 3 ≤ d≤ 4.

  3. 3.

    if \(2\nmid s\) and e ≥ 2, we have 3 ≤ d≤ 4. In particular, d = 4 if m = 3e.

Proof

We only give the proof of first part since the proofs of other parts are similar to the proof of first part. It can easily be checked that \(\mathcal {C}_{D}^{\perp }\) has no codeword of weight 1. Next, suppose to the contrary that there exists a codeword \(c\in \mathcal {C}_{D}^{\perp }\) such that wt(c)= 2. Then, for all \(a\in \mathbb {F}_{p^{m}}\), we have

$$ \begin{array}{@{}rcl@{}} &&c_{i}\text{Tr}^{m}_{e}(ad_{i})+c_{j}\text{Tr}^{m}_{e}(ad_{i})=0 \text{ for some } c_{i},c_{j}\in\mathbb{F}_{p^{e}}^{*} \text{ and } d_{i},d_{j}\in D\\ &\iff & \text{Tr}^{e}_{m}\left( a(c_{i}d_{i}+c_{j}d_{j})\right)=0 \iff c_{i}d_{i}+c_{j}d_{j}=0 \text{ since } \text{Tr}^{m}_{e} \text{ is onto}\\ &\implies&c_{i}\text{Tr}^{m}_{e}(d_{i})+c_{j}\text{Tr}^{m}_{e}(d_{j})=0\implies c_{i}=-c_{j}. \end{array} $$

Consequently, we have that ci(didj) = 0. This is contradictory to the facts that ci≠ 0 and didj. Hence, we do not have any vector \(c\in \mathcal {C}_{D}^{\perp }\) of weight 2. The upper bound is directly follows from the sphere-packing (or Hamming ) bound. Thus, the result is established. □

Example 3.23

Let (p, m, s, e) = (5,6,3,2). Then the code \(\mathcal {C}_{D}^{\perp }\) has parameters [24,21,4], and it is optimal with respect to the Griesmer bound. In addition, it is MDS code.

Example 3.24

Let (p, m, s, e) = (3,9,3,3). Then the code \(\mathcal {C}_{D}^{\perp }\) has parameters [27,24,4], and it is optimal with respect to the Griesmer bound. In fact, it is MDS code.

4 Application to constant composition codes

In this section, we construct some optimal constant composition codes employing the complete weight enumerators of the linear code \(\mathcal {C}_{D}\). The code \(\mathcal {C}_{D}\) can be found in Theorems 3.7, 3.10, 3.14 and 3.17.

It is well known that one can easily construct constant composition codes from the complete weight enumerators of the linear codes. Let r be a positive interger, and let A = {a0, a1,…,ar− 1} be a code alphabet. Any subset CSn of size M and minimum distance d such that each codeword has the same composition (t0, t1,…,tr− 1) is known as (n, M, d,(t0, t1,…,tr− 1)) constant composition code over S. There are many applications of constant composition codes in communications engineering [3,19]. The following LFVC bound of constant composition codes is given in [17].

Lemma 4.1

Let (n, M, d,(t0, t1,…,tr− 1)) be a constant composition code over S with \(nd-n^{2}+({t_{0}^{2}}+{t_{1}^{2}}+\cdots +t_{r-1}^{2})>0\). Then

$$M\geq\frac{nd}{nd-n^{2}+({t_{0}^{2}}+{t_{1}^{2}}+\cdots+t_{r-1}^{2})}.$$

A constant composition code which meets the LFVC bound is known as optimal constant composition code. We construct some optimal constant composition codes from the complete weight enumerators of \(\mathcal {C}_{D}\) in the following theorems:

Theorem 4.2

Consider the CWE of the Theorem 3.10. If m = 4e, then there exists an \((n, M, d,(t_{0},t_{1},\ldots ,t_{p^{e}-1}))\) optimal constant composition code \(\tilde {\mathcal {C}}\) over \(\mathbb {F}_{p^{e}}\), where \(n=p^{m-2e}-p^{\frac {m-2e}{2}},~M=p^{\frac {m-2e}{2}}-1,~d=p^{m-2e}-p^{m-3e},~t_{0}=p^{m-3e}-p^{\frac {m-2e}{2}},~t_{i}=p^{m-3e} \text { for }i\neq 0\).

Proof

Since, we have pm− 2e − 1 codewords of desired parameters n, t0 and ti(1 ≤ ipe − 1). So, any codeword can be re-arranged as

$$(\underset{p^{m-3e}\text{ symbols}}{\underbrace{w_{1},w_{1},\ldots,w_{1}}},\underset{p^{m-3e}\text{ symbols}}{\underbrace{w_{2},w_{2},\ldots,w_{2}}},\ldots,\underset{p^{m-3e}\text{ symbols}}{\underbrace{w_{p^{e}-1},w_{p^{e}-1},\ldots,w_{p^{e}-1}}},\underset{t_{0}\text{ symbols}}{\underbrace{0,0,\ldots,0}}).$$

Fix all zero symbols, and consider all same symbols as a single symbol. Now, we take pe − 1 cycles of the nonzero symbols of the above re-arranged codeword. Define \(\tilde {\mathcal {C}}\) as the collection of all constructed cycles. It is obvious that the minimum distance of the code \(\tilde {\mathcal {C}}\) is pm− 2epm− 3e.

One can easily check that \(nd-n^{2}+({t_{0}^{2}}+{t_{1}^{2}}+\cdots +t_{p^{e}-1}^{2})=P^{\frac {3m-6e}{2}}-P^{\frac {3m-8e}{2}}>0 \) and \(nd=(p^{m-2e}-p^{\frac {m-2e}{2}})(p^{m-2e}-p^{m-3e})\). Then we have

$$ \frac{nd}{nd-n^{2}+({t_{0}^{2}}+{t_{1}^{2}}+\cdots+t_{p^{e}-1}^{2})}=\frac{(p^{m-2e}-p^{\frac{m-2e}{2}})(p^{m-2e}-p^{m-3e})}{p^{\frac{m-2e}{2}}(p^{m-2e}-p^{m-3e})}=M. $$

Hence, by Lemma 4.1, \(\tilde {\mathcal {C}}\) is an optimal constant composition code. Thus, the result is established. □

Theorem 4.3

Consider the CWE of the Theorem 3.17. If m = 3e and \(\overline {\eta }(-3)=1\), then there exists an \((n, M, d,(t_{0},t_{1},\ldots ,t_{p^{e}-1}))\) optimal constant composition code \(\tilde {\mathcal {C}}\) over \(\mathbb {F}_{p^{e}}\), where \(n=p^{m-2e}-p^{\frac {m-3e}{2}},~M=p^{\frac {m-e}{2}}-1,~d=p^{m-2e}-p^{m-3e},~t_{0}=p^{m-3e}-p^{\frac {m-3e}{2}},~t_{i}=p^{m-3e} \text { for } i\neq 0\).

Proof

Following the arguments used in the proof of previous theorem, we can construct \(p^{\frac {m-e}{2}}-1\) codewords of desired parameters \((n, M, d,(t_{0},t_{1},\ldots ,t_{p^{e}-1}))\).

One can easily check that \(nd-n^{2}+({t_{0}^{2}}+{t_{1}^{2}}+\cdots +t_{p^{e}-1}^{2})=P^{\frac {3m-7e}{2}}-P^{\frac {3m-9e}{2}}>0 \) and \(nd=(p^{m-2e}-p^{\frac {m-3e}{2}})(p^{m-2e}-p^{m-3e})\). Then, we have

$$ \frac{nd}{nd-n^{2}+({t_{0}^{2}}+{t_{1}^{2}}+\cdots+t_{p^{e}-1}^{2})}=\frac{(p^{m-2e}-p^{\frac{m-3e}{2}})(p^{m-2e}-p^{m-3e})}{p^{\frac{m-3e}{2}}(p^{m-2e}-p^{m-3e})}=M. $$

By Lemma 4.1, \(\tilde {\mathcal {C}}\) is an optimal constant composition code. This completes the proof. □

5 Concluding remarks

In this paper, a class of linear codes over arbitrary finite fields with their complete weight enumerators by giving two restrictions in the defining set has been presented. In addition, the weight distributions of the codes are also determined. The codes presented in this paper have improved relative minimum distance as we have shown in Table 10 which improves error-correcting capability. In Corollary 3.20, we have found a MDS code [3e,3,3e − 2] for any positive integer e. Furthermore, in Sections 3.2 and 4, we have found some optimal dual codes and constant composition codes respectively. Lastly the work presented in the paper may further be extended to find more applicable codes.