1 Introduction

Let \(\mathbb {F}_{p}\) be the finite field with p elements where p is an odd prime. An [nkd] linear code \(\mathcal {C}\) over \(\mathbb {F}_{p}\) is k-dimensional subspace of \(\mathbb {F}^{n}_{p}\) with minimum distance d. We recall the definition of the complete weight enumerator of linear code [14]. Suppose that the elements of \(\mathbb {F}_{q}\) are \(w_{0}=0,w_{1},\ldots ,w_{q-1}\), which are listed in some fixed order. The composition of a vector \(\mathbf v =(v_{0},v_{1},\ldots ,v_{n-1})\in \mathbb {F}_{q}^{n}\) is defined to be comp(v)=\((t_{0},t_{1},\ldots ,t_{q-1}),\) where each \(t_{i}=t_{i}(\mathbf v )\) is the number of components \(v_{j}(0\leqslant j\leqslant n-1)\) of v that equal to \(w_{i}\). Clearly, we have

$$\begin{aligned} \displaystyle \sum _{i=0}^{q-1}t_{i}=n. \end{aligned}$$

Definition 1.1

Let \(\textit{C}\) be an [nk] linear code over \(\mathbb {F}_{q}\) and let \(A(t_{0},t_{1}\ldots ,t_{q-1})\) be the number of codewords \(\mathbf{c }\in \textit{C}\) with comp(c)=\((t_{0},t_{1},\ldots ,t_{q-1}).\) Then the complete weight enumerator of C is defined to be the polynomial

$$\begin{aligned} W_{\textit{C}}&=\sum _\mathbf{c \in \textit{C}}z_{0}^{t_{0}}z_{1}^{t_{1}}\cdots z_{q-1}^{t_{q-1}}\\&=\sum _{(t_{0},t_{1},\ldots ,t_{q-1})\in B_{n}}A(t_{0},t_{1},\ldots ,t_{q-1})z_{0}^{t_{0}}z_{1}^{t_{1}}\cdots z_{q-1}^{t_{q-1}}, \end{aligned}$$

\(\mathrm{where}\;B_{n}=\lbrace (t_{0},t_{1},\ldots ,t_{q-1}):0\leqslant t_{i}\leqslant n, \displaystyle \sum _{i=0}^{q-1}t_{i}=n\rbrace .\)

Recently, linear codes with a few weights have been investigated [1, 610, 13, 16, 19] by using exponential sums in some cases. They may have many applications in association schemes [3], strongly regular graphs [4], and secret sharing schemes [5, 18]. In addition, the complete weight enumerators of linear codes over finite fields can be applied to compute the deception probabilities of certain authentication codes constructed from linear codes [11, 12]. We begin to recall a class of two-weight and three-weight linear codes which were proposed by Ding and Ding [9]. Let \(D=\{x \in \mathbb {F}^{*}_{q} : {\mathrm {Tr}}_{m}(x^{2})=0\},\) where \({\mathrm {Tr}}_{m}\) is the trace function from \(\mathbb {F}_{q}\) onto \(\mathbb {F}_{p}\). Then a linear code of length \(n=|D|\) over \(\mathbb {F}_{p}\) can be defined by

$$\begin{aligned} {\mathcal {C}}_{D}=\{\mathbf{c}(a)=({\mathrm {Tr}}_{m}(ax))_{\in D} : a\in \mathbb {F}_{q}\}. \end{aligned}$$

It was proved that \(\mathcal {C}_{D}\) is a two-weight code if m is even and a three-weight code if m is odd. Motivated by the results given in [9], Bae et al. gave a generalization of Ding and Ding’s case [1]. Let \(D = \{(x_{1},x_{2},\ldots ,x_{t}) \in \mathbb {F}_{q}^{t}\setminus \{(0,0,\ldots ,0)\} : {\mathrm {Tr}}_{m}(x_{1}^{2}+x_{2}^{2}+\cdots +x_{t}^{2})=0\}.\) They define a p-ary linear code \(\mathcal {C}_{D}\) by

$$\begin{aligned} {\mathcal {C}}_{D}=\{{\mathbf{c}}(a_{1},a_{2},\ldots ,a_{t}) : a_{1},a_{2},\ldots ,a_{t}\in \mathbb {F}_{p^{m}}\}, \end{aligned}$$

where

$$\begin{aligned} \mathbf c (a_{1},a_{2},\ldots ,a_{t})=({\mathrm {Tr}}_{m}(a_{1}x_{1}+a_{2}x_{2}+\cdots +a_{t}x_{t}))_{(x_{1},x_{2},\ldots ,x_{t})\in D.} \end{aligned}$$

It was also shown that \(\mathcal {C}_{D}\) is two-weight if tm is even and three-weight if tm is odd. If \(D=\{x \in \mathbb {F}^{*}_{q} : {\mathrm {Tr}}_{m}(x)=0\}\) and \(\mathcal {C}_{D}=\{{\mathrm {Tr}}_{m}(ax^{2})_{x\in D} : a\in \mathbb {F}_{q}\},\) Yang and Yao [17] determined the complete weight enumerators of \(\mathcal {C}_{D}\). In this paper, let \(D = \{(x_{1},x_{2},\ldots ,x_{t}) \in \mathbb {F}_{q}^{t}\setminus \{(0,0,\ldots ,0)\} : {\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})=0\}.\) We define a p-ary linear code \(\mathcal {C}_{D}\) by

$$\begin{aligned} \mathcal {C}_{D}=\{\mathbf {c}(a_{1},a_{2},\ldots ,a_{t}) : (a_{1},a_{2},\ldots ,a_{t})\in \mathbb {F}^{t}_{q}\}, \end{aligned}$$
(1)

where

$$\begin{aligned} \mathbf {c}(a_{1},a_{2},\ldots ,a_{t})=({\mathrm {Tr}}_{m}(a_{1}x^{2}_{1}+a_{2}x^{2}_{2}+\cdots +a_{t}x^{2}_{t}))_{(x_{1},x_{2},\ldots ,x_{t}) \in D}. \end{aligned}$$
(2)

We shall present the complete weight enumerators of this class of linear codes and get several linear codes with a few weights. In addition, this paper generalizes the results of Yang and Yao [17].

2 Preliminaries

Let p be an odd prime and \(q=p^{m}\) for a positive integer m. For any \(a\in \mathbb {F}_{q}\), we can define an additive character of the finite field \(\mathbb {F}_{q}\) as follows:

$$\begin{aligned} \displaystyle \psi _{a}:\mathbb {F}_{q} \longrightarrow \mathbb {C}^{*}, \psi _{a}(x)=\zeta _{p}^{{\mathrm {Tr}}_{m}(ax)}, \end{aligned}$$

where \(\zeta _p=e^{\frac{2\pi \sqrt{-1}}{p}}\) is a p-th primitive root of unity. It is clear that \(\psi _0(x)=1\) for all \(x \in \mathbb {F}_{q}\). Then \(\psi _0\) is called the trivial additive character of \(\mathbb {F}_{q}\). If \(a=1\), we call \(\psi :=\psi _1\) the canonical additive character of \(\mathbb {F}_{q}\). It is easy to see that \(\psi _a(x)=\psi (ax)\) for all \(a, x \in \mathbb {F}_q\). The orthogonal property of additive characters which can be found in [14] is given by

$$\begin{aligned} \displaystyle \sum _{x\in \mathbb {F}_{q}}\psi _{a}(x) =&\left\{ \begin{array}{ll} q, &{} \text {if } a=0,\\ 0, &{} \text {if } a\in \mathbb {F}_{q}^{*}. \end{array} \right. \end{aligned}$$

Let \(\lambda : \mathbb {F}_q^* \rightarrow \mathbb {C}^*\) be a multiplicative character of \(\mathbb {F}_q^*\). Now we define the Gauss sum over \(\mathbb {F}_{q}\) by

$$\begin{aligned} G(\lambda )=\sum _{x \in \mathbb {F}_{q}^{*}} \lambda (x) \psi (x). \end{aligned}$$

Let \(q-1=sN\) for two positive integers \(s>1\), \(N>1\) and \(\alpha \) be a fixed primitive element of \(\mathbb {F}_{q}\). Let \(\langle \alpha ^{N} \rangle \) denote the subgroup of \(\mathbb {F}_{q}^{*}\) generated by \(\alpha ^{N}\). The cyclotomic classes of order N in \(\mathbb {F}_{q}\) are the cosets \(C_{i}^{(N,q)}=\alpha ^{i}\langle \alpha ^{N}\rangle \) for \(i=0,1,\ldots , N-1.\) We know that \(|C_{i}^{(N,q)}|=\frac{q-1}{N}\). The Gaussian periods of order N are defined by

$$\begin{aligned} \displaystyle \eta _{i}^{(N,q)}=\sum _{x\in C_{i}^{(N,q)}}\psi (x). \end{aligned}$$

Lemma 2.1

[2, 14] Suppose that \(q=p^m\) and \(\eta \) is the quadratic character of \(\mathbb {F}_{q}^{*}\) where p is an odd prime and \(m \ge 1\). Then

$$\begin{aligned} \displaystyle G(\eta )=(-1)^{m-1} \sqrt{(p^*)^m}=\left\{ \begin{array}{ll} (-1)^{m-1} \sqrt{q}, &{} \text{ if } p \equiv 1 \pmod 4, \\ (-1)^{m-1} (\sqrt{-1})^m \sqrt{q}, &{} \text{ if } p \equiv 3 \pmod 4, \end{array}\right. \end{aligned}$$

where \(p^*=\big (\frac{-1}{p}\big )p=(-1)^{\frac{p-1}{2}}p\).

Lemma 2.2

[14] If q is odd and \(f(x)=a_{2}x^{2}+a_{1}x+a_{0}\in \mathbb {F}_{q}[x]\) with \(a_{2}\ne 0,\) then

$$\begin{aligned} \displaystyle \sum _{x\in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(f(x))}=\zeta _p^{{\mathrm {Tr}}_{m}(a_{0}-a_{1}^2(4a_{2})^{-1})}\eta (a_{2})G(\eta ), \end{aligned}$$

where \(\eta \) is the quadratic character of \(\mathbb {F}_{q}^{*}\).

Lemma 2.3

[15] When \(N=2\), the Gaussian periods are given by

$$\begin{aligned} \displaystyle \eta ^{(2,q)}_{0}=&\left\{ \begin{array}{ll} \frac{-1+(-1)^{m-1}}{2}\sqrt{q}, &{}\quad \text { if } p\equiv 1\pmod {4},\\ \frac{-1+(-1)^{m-1}(\sqrt{-1})^{m}\sqrt{q}}{2}, &{} \quad \text {if} p\equiv 3\pmod {4}, \end{array} \right. \end{aligned}$$

and \(\eta ^{(2,q)}_{1}=-1-\eta ^{(2,q)}_{0}\).

3 Complete weight enumerators

In this section, we will investigate the complete weight enumerators of the linear codes \(\mathcal {C}_{D}\) defined by (1) and (2), where

$$\begin{aligned} D=\{(x_{1},x_{2},\ldots ,x_{t}) \in \mathbb {F}_{q}^{t}\setminus \{(0,0,\ldots ,0)\} : {\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})=0\}. \end{aligned}$$

Let \(\eta _{p}\) be the quadratic character of \(\mathbb {F}^{*}_{p}\) and let \(G(\eta _{p})\) denote the quadratic Gauss sum over \(\mathbb {F}_{p}\). For \(z\in \mathbb {F}^{*}_{p}\), it is easily checked that \(\eta (z)=\eta _{p}(z)\) if m is odd and \(\eta (z)=1\) if m is even, where \(\eta \) is the quadratic character of \(\mathbb {F}^{*}_{q}\) (see [9]). Since the trace function is balanced, we have the following lemma.

Lemma 3.1

Denote \(n_{c}=|\{(x_{1}, x_{2}, \ldots , x_{t}) \in \mathbb {F}^{t}_{q} :{\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})=c\}|\) for each \(c \in \mathbb {F}_{p}\), then \(n_{c}=p^{tm-1}.\)

By Lemma 3.1 it is easy to see that the length of \(\mathcal {C}_{D}\) is \(n=n_{0}-1=p^{tm-1}-1.\) For a codeword \(\mathbf {c}(a_{1},a_{2},\ldots ,a_{t})\) of \(\mathcal {C}_{D}\) and \(\rho \in \mathbb {F}_{p}^{*},\) let \(N_{\rho }:=N_{\rho }(a_{1},a_{2},\ldots ,a_{t})\) be the number of components \({\mathrm {Tr}}_{m}(a_{1}x^{2}_{1}+\cdots +a_{t}x^{2}_{t})\) of \(\mathbf {c}(a_{1},\ldots , a_{t})\) which are equal to \(\rho \). Then

$$\begin{aligned} N_{\rho }&=\sum _{\begin{array}{c} x_{1}, x_{2}, \ldots , x_{t} \in \mathbb {F}_{q}\\ (x_{1}, x_{2}, \ldots , x_{t})\ne (0,0,\ldots ,0) \end{array}}\Big (\frac{1}{p}\sum _{y \in \mathbb {F}_{p}}\zeta _p^{y{\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})}\Big )\Big (\frac{1}{p}\sum _{z \in \mathbb {F}_{p}}\zeta _p^{z\mathrm {Tr_{m}}(a_{1}x^{2}_{1}+\cdots +a_{t}x^{2}_{t})-z\rho }\Big )\nonumber \\&=\frac{1}{p^{2}}\sum _{x_{1}, x_{2}, \ldots , x_{t} \in \mathbb {F}_{q}}\Big (1+\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _p^{y{\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})}\Big )\Big (1+\sum _{z \in \mathbb {F}^{*}_{p}}\zeta _p^{z{\mathrm {Tr}}_{m}(a_{1}x^{2}_{1}+\cdots +a_{t}x^{2}_{t})-z\rho }\Big )\nonumber \\&=p^{tm-2}+\frac{1}{p^{2}}(\Omega _{1}+\Omega _{2}+\Omega _{3}), \end{aligned}$$
(3)

where

$$\begin{aligned}&\Omega _{1}=\sum _{y \in \mathbb {F}_{p}^{*}}\sum _{x_{1} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(yx_{1})}\sum _{x_{2} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(yx_{2})}\cdots \sum _{x_{t} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(yx_{t})}=0,\\&\Omega _{2}=\sum _{z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\sum _{x_{1} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(za_{1}x^{2}_{1})}\sum _{x_{2} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(za_{2}x^{2}_{2})}\cdots \sum _{x_{t} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(za_{t}x^{2}_{t})},\\&\mathrm {and}\\&\Omega _{3}=\sum _{y,z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\sum _{x_{1} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(za_{1}x^{2}_{1}+yx_{1})}\sum _{x_{2} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(za_{2}x^{2}_{2}+yx_{2})}\cdots \sum _{x_{t} \in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(za_{t}x^{2}_{t}+yx_{t})}. \end{aligned}$$

Lemma 3.2

Suppose that there are exactly k elements \(a_{i_{1}},\ldots ,a_{i_{k}}\ne 0\) among \(a_{1},\ldots ,a_{t}\) for \(1\le k\le t\).

  1. (1)

    If m is even, then

    $$\begin{aligned} \displaystyle \Omega _{2}=-q^{t-k}\eta (a_{i_{1}}\cdots a_{i_{k}})G(\eta )^{k}. \end{aligned}$$
  2. (2)

    If m is odd, then

    $$\begin{aligned} \Omega _{2}=&\left\{ \begin{array}{ll} -q^{t-k}\eta (a_{i_{1}}\cdots a_{i_{k}})G(\eta )^{k}, &{}\quad k\;\mathrm{is\;even,}\\ q^{t-k}\eta (a_{i_{1}}\cdots a_{i_{k}})G(\eta )^{k}G(\eta _{p})\eta _{p}(-\rho ), &{}\quad k\;\mathrm{is\;odd.} \end{array} \right. \end{aligned}$$

Proof

If \(a_{1}=a_{2}=\cdots =a_{t}=0\), then it is easy to see that \(\Omega _{2}=-q^{t}\). Otherwise by Lemma 2.2, we get

$$\begin{aligned} \Omega _{2}&=q^{t-k}\sum _{z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta (za_{i_{1}})G(\eta )\eta (za_{i_{2}})G(\eta )\cdots \eta (za_{i_{k}})G(\eta )\\&=q^{t-k}\eta (a_{i_{1}}a_{i_{2}}\cdots a_{i_{k}})G(\eta )^{k}\sum _{z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta (z)^{k}. \end{aligned}$$

If m is even or if m is odd and k is even, then \(\eta (z)^{k}=1\). Thus, we get the result.

If m is odd and k is odd, then \(\eta _{p}(z)^{k}=\eta _{p}(z)\) and \(\displaystyle \sum _{z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta _{p}(z)=G(\eta _{p})\eta _{p}(-\rho ).\) Thus, we get the result. \(\square \)

To simplify formulas, we denote \(A=a_{1}\cdots a_{t}\) and \(B=a^{-1}_{1}+\cdots +a^{-1}_{t}\) throughout this paper.

Lemma 3.3

If \(a_{1}a_{2}\cdots a_{t}=0\), then \(\Omega _{3}=0\). Assume that \(a_{1}a_{2}\cdots a_{t}\ne 0\).

  1. (1)

    If tm is even, then

    $$\begin{aligned} \displaystyle \Omega _{3}=&\left\{ \begin{array}{ll} -(p-1)G(\eta )^{t}\eta (A), &{} \quad \mathrm{if}\;{\mathrm {Tr}}_{m}(B)=0,\\ G(\eta )^{t}\eta (A)\big (p\eta _{p}(-{\mathrm {Tr}}_{m}(B))\eta _{p}(\rho )+1\big ), &{}\quad \mathrm{if}\;{\mathrm {Tr}}_{m}(B)\ne 0. \end{array} \right. \end{aligned}$$
  2. (2)

    If tm is odd, then

    $$\begin{aligned} \displaystyle \Omega _{3}=&\left\{ \begin{array}{ll} (p-1)G(\eta )^{t}\eta (A)G(\eta _{p})\eta _{p}(-\rho ),\quad \;\;\,\,\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\mathrm{if}\;{\mathrm {Tr}}_{m}(B)=0,\\ -G(\eta )^{t}\eta (A)G(\eta _{p})\big (\eta _{p}(-{\mathrm {Tr}}_{m}(B))+\eta (-\rho )\big ),\quad \;\;\;\;\;\;\;\;\;\;\;\;\;\mathrm{if}\;{\mathrm {Tr}}_{m}(B)\ne 0. \end{array} \right. \end{aligned}$$

Proof

By Lemma 2.2 we have

$$\begin{aligned} \Omega _{3}=&\sum _{y,z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\Big (\zeta _{p}^{{\mathrm {Tr}}_{m}(-y^{2}(4a_{1}z)^{-1})}\eta (za_{1})G(\eta )\Big )\cdots \Big (\zeta _{p}^{{\mathrm {Tr}}_{m}(-y^{2}(4a_{t}z)^{-1})}\eta (za_{t})G(\eta )\Big )\nonumber \\ =&\sum _{y,z \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\zeta _{p}^{{\mathrm {Tr}}_{m}(-y^{2}((4a_{1}z)^{-1})+\cdots +(4a_{t}z)^{-1}))}\eta (za_{1})\cdots \eta (za_{1})G(\eta )^{t}\nonumber \\ =&G(\eta )^{t}\eta (A)\sum _{z\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta (z)^{t}\sum _{y\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-y^{2}(4z)^{-1}{\mathrm {Tr}}_{m}(B)} \end{aligned}$$
(4)
$$\begin{aligned} =&G(\eta )^{t}\eta (A)\sum _{z\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta (z)^{t}\left( \sum _{y\in \mathbb {F}_{p}}\zeta _{p}^{-y^{2}(4z)^{-1}{\mathrm {Tr}}_{m}(B)}-1\right) . \end{aligned}$$
(5)

Now, we consider the case that tm is even. If \({\mathrm {Tr}}_{m}(B)=0\), then from (4) we have

$$\begin{aligned} \Omega _{3}=-(p-1)G(\eta )^{t}\eta (A). \end{aligned}$$

If \({\mathrm {Tr}}_{m}(B)\ne 0\), then from Lemma 2.2 and (5) we have

$$\begin{aligned} \Omega _{3}&=G(\eta )^{t}\eta (A)\eta _{p}({\mathrm {Tr}}_{m}(B))G(\eta _{p})\sum _{z\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta _{p}(-(4z)^{-1})+G(\eta )^{t}\eta (A)\\&= G(\eta )^{t}\eta (A)\eta _{p}({\mathrm {Tr}}_{m}(B))G(\eta _{p})\sum _{z\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta _{p}(-z)+G(\eta )^{t}\eta (A). \end{aligned}$$

Thus, we get the result.

Now, assume that tm is odd. If \({\mathrm {Tr}}_{m}(B)=0\), then it follows from (4) that

$$\begin{aligned} \Omega _{3}=(p-1)G(\eta )^{t}\eta (A)G(\eta _{p})\eta _{p}(-\rho ). \end{aligned}$$

Also, if \({\mathrm {Tr}}_{m}(B)\ne 0\), then it follows from Lemma 2.2 and (5) that

$$\begin{aligned} \Omega _{3}&=G(\eta )^{t}\eta (A)\sum _{z\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\eta _{p}(z)\Big (\eta _{p}(-(4z)^{-1})\eta _{p}({\mathrm {Tr}}_{m}(B))G(\eta _{p})-1\Big )\\&=G(\eta )^{t}\eta (A)\sum _{z\in \mathbb {F}^{*}_{p}}\zeta _{p}^{-z\rho }\Big (\eta _{p}(-1)\eta _{p}({\mathrm {Tr}}_{m}(B))G(\eta _{p})-\eta _{p}(z) \Big ). \end{aligned}$$

Thus, we get the results. \(\square \)

By the Lemmas 3.2 and 3.3, we obtain the values of \(N_{\rho }\). To get the frequency of each composition, we need the following lemmas.

Lemma 3.4

For \(c \in \mathbb {F}_{p}\), let

$$\begin{aligned} n^{'}_{c}=|\{(a_{1},\ldots ,a_{t})\in (\mathbb {F}^{*}_{q})^{t} : {\mathrm {Tr}}_{m}(B)=c\}|. \end{aligned}$$

Then we have

$$\begin{aligned} n^{'}_{c}=&\left\{ \begin{array}{ll} \frac{1}{p}\{(p^{m}-1)^{t}+(-1)^{t}(p-1)\}, &{}\quad \text {if } c=0,\\ \frac{1}{p}\{(p^{m}-1)^{t}-(-1)^{t}\}, &{} \quad \text {if } c\ne 0. \end{array} \right. \end{aligned}$$

Proof

By the orthogonal property of additive characters we get

$$\begin{aligned} n^{'}_{c}=&\sum _{a_{1},\ldots ,a_{t} \in \mathbb {F}_{q}^{*}}\frac{1}{p}\sum _{y \in \mathbb {F}_{p}}\zeta _{p}^{y({\mathrm {Tr}}_{m}(B)-c)}\\ =&\frac{(q-1)^{t}}{p}+\frac{1}{p}\left( \sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\sum _{a_{1},\ldots ,a_{t} \in \mathbb {F}_{q}^{*}}\zeta _{p}^{{\mathrm {Tr}}_{m}(y(B)-yc)}\right) \\ =&\frac{(q-1)^{t}}{p}+\frac{1}{p}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\left( \sum _{a_{1} \in \mathbb {F}_{q}^{*}}\zeta _{p}^{{\mathrm {Tr}}_{m}(ya^{-1}_{1})}\cdots \sum _{a_{t} \in \mathbb {F}_{q}^{*}}\zeta _{p}^{{\mathrm {Tr}}_{m}(ya^{-1}_{t})}\right) \\ =&\frac{(q-1)^{t}}{p}+\frac{1}{p}\left( \sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}(-1)^{t}\right) . \end{aligned}$$

Thus, we get the desired results. \(\square \)

Lemma 3.5

For \(i\in \{-1,1\}\), let

$$\begin{aligned} n_{i}=|\{(a_{1},\ldots ,a_{t})\in (\mathbb {F}^{*}_{q})^{t} : \eta (A)=i\;\mathrm{{and}}\; {\mathrm {Tr}}_{m}(B)=0\}| \end{aligned}$$
  1. (1)

    If m is even, then

    $$\begin{aligned}&n_{1}=\frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)\big ((-1)^{t}+G(\eta )^{t}\big )\big )\\&n_{-1}=\frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)\big ((-1)^{t}-G(\eta )^{t}\big )\big ). \end{aligned}$$
  2. (2)

    If m is odd, then

    $$\begin{aligned} n_{1}=&\left\{ \begin{array}{ll} \frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)\big ((-1)^{t}+G(\eta )^{t}\big )\big ), &{}\quad \mathrm{{if}}\;t\;\mathrm{{is\;even}},\\ \frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)(-1)^{t}\big ), &{}\quad \mathrm{{if}}\;t\;\mathrm{{is\;odd}}.\\ \end{array} \right. \\ n_{-1}=&\left\{ \begin{array}{ll} \frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)\big ((-1)^{t}-G(\eta )^{t}\big )\big ), &{}\quad \mathrm{{if}}\;t\;\mathrm{{is\;even}},\\ \frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)(-1)^{t}\big ), &{}\quad \mathrm{{if}}\;t\;\mathrm{{is\;odd}}. \end{array} \right. \end{aligned}$$

Proof

It follows from Lemma 3.4 that \(n_{-1}=n^{'}_{0}-n_{1}\). Thus, we only need to compute \(n_{1}\). Let \(\alpha \) be a primitive element of \(\mathbb {F}_{q}\). Then \(\mathbb {F}^{*}_{p}=\langle \alpha ^{\frac{q-1}{p-1}}\rangle \). Note that \(\eta (A)=1\) if and only if \(A\in C_{0}^{(2,q)}=\langle \alpha ^{2}\rangle \).

$$\begin{aligned} n_{1}=&\sum _{A \in C_{0}^{(2,q)} }\frac{1}{p}\sum _{y \in \mathbb {F}_{p}}\zeta _{p}^{y\mathrm {Tr_{m}}(B)}\nonumber \\ =&\sum _{A \in C_{0}^{(2,q)}}\frac{1}{p}\left( \sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{y\mathrm {Tr_{m}}(B)}+1\right) \nonumber \\ =&\frac{1}{p}\frac{(q-1)^{t}}{2}+\frac{1}{p}\sum _{A \in C_{0}^{(2,q)}}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{y\mathrm {Tr_{m}}(B)}\nonumber \\ =&\frac{1}{p}\frac{(q-1)^{t}}{2}+\frac{1}{p}\sum _{y \in \mathbb {F}^{*}_{p}}\left( \sum ^{[\frac{t}{2}]}_{j=0}\sum _{\begin{array}{c} a_{i_{1}},\ldots ,a_{i_{2j}} \in C_{1}^{(2,q)}\\ a_{1},\ldots ,a_{t}\setminus \{a_{i_{1}},\ldots ,a_{i_{2j}}\} \in C_{0}^{(2,q)} \end{array}}\zeta _{p}^{\mathrm {Tr_{m}}(ya^{-1}_{1})}\cdots \zeta _{p}^{\mathrm {Tr_{m}}(ya^{-1}_{t})}\right) \nonumber \\ =&\frac{1}{p}\frac{(q-1)^{t}}{2}+\frac{1}{p}\sum _{y \in \mathbb {F}^{*}_{p}}\left( \sum ^{[\frac{t}{2}]}_{j=0}\left( {\begin{array}{c}t\\ 2j\end{array}}\right) \sum _{\begin{array}{c} a_{i_{1}},\ldots ,a_{2j} \in C_{1}^{(2,q)}\\ a_{2j+1},\ldots ,a_{t} \in C_{0}^{(2,q)} \end{array}}\zeta _{p}^{\mathrm {Tr_{m}}(ya^{-1}_{1})}\cdots \zeta _{p}^{\mathrm {Tr_{m}}(ya^{-1}_{t})}\right) . \end{aligned}$$
(6)

Assume that m is even, then 2 divides \(\frac{q-1}{p-1}\) and so \(\mathbb {F}^{*}_{p}\subseteq C_{0}^{(2,q)}.\) By (6) we can get

$$\begin{aligned} n_{1}=\frac{1}{p}\frac{(q-1)^{t}}{2}+\frac{1}{p}(p-1)\left( \sum ^{[\frac{t}{2}]}_{j=0}\left( {\begin{array}{c}t\\ 2j\end{array}}\right) (\eta ^{(2,q)}_{0})^{t-2j}(\eta ^{(2,q)}_{1})^{2j}\right) \end{aligned}$$

Note that \(\eta ^{(2,q)}_{1}+\eta ^{(2,q)}_{0}\)=\(-1\) and \(\eta ^{(2,q)}_{0}-\eta ^{(2,q)}_{1}=G(\eta ).\) Thus, we get the result. Now suppose that m is odd, then \(|\mathbb {F}^{*}_{p}\cap C^{(2,q)}_{0}|=|\mathbb {F}^{*}_{p}\cap C^{(2,q)}_{1}|=\frac{p-1}{2}.\) By (6) we have

$$\begin{aligned} n_{1}=&\frac{1}{p}\frac{(q-1)^{t}}{2}+\frac{1}{p} \left( \frac{p-1}{2}\sum ^{[\frac{t}{2}]}_{j=0}\left( {\begin{array}{c}t\\ 2j\end{array}}\right) (\eta ^{(2,q)}_{0})^{t-2j}(\eta ^{(2,q)}_{1})^{2j}\right. \\&\qquad \qquad \qquad \qquad \quad \left. +\frac{p-1}{2}\sum ^{[\frac{t}{2}]}_{j=0}\left( {\begin{array}{c}t\\ 2j\end{array}}\right) (\eta ^{(2,q)}_{1})^{t-2j}(\eta ^{(2,q)}_{0})^{2j}\right) \\ =&\frac{1}{p}\frac{(p^{m}-1)^{t}}{2}+\frac{p-1}{2p}\left( \frac{1}{2}\Big ((\eta ^{(2,q)}_{0}-\eta ^{(2,q)}_{1})^{t}+(\eta ^{(2,q)}_{1}-\eta ^{(2,q)}_{0})^{t}\Big )+(-1)^{t}\right) . \end{aligned}$$

Note that \(n_{-1}=n^{'}-n_{1}\) and this completes the proof. \(\square \)

Recall that \(\alpha \) is a fixed primitive element of \(\mathbb {F}_{q}\).

Lemma 3.6

For \(0\le k \le [t/2]\) and \(c\in C_{0}^{(2,p)}\), let \(n_{2k,c}=|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} : {\mathrm {Tr}}_{m}(\alpha a_{1}^{2}+\cdots +\alpha a_{2k}^{2}+a_{2k+1}^{2}+\cdots +a_{t}^{2})=c\}|.\)

  1. (1)

    If m is even, then

    $$\begin{aligned} n_{2k,c}=\frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )+1)^{2k}(G(\eta )-1)^{t-2k}. \end{aligned}$$
  2. (2)

    If m is odd and \(k<t/4\), then

    $$\begin{aligned} n_{2k,c}=&\left\{ \begin{array}{ll} \displaystyle \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k}\left( \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}\right. \\ \left. \displaystyle +\,\eta _{p}(-c)\sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}G(\eta _{p})\right) ,\;\mathrm{{if}}\;t\;\mathrm{{is\;even}},\\ \displaystyle \frac{(p^{m}-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{2k}\left( \sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}\right. \\ \left. \displaystyle +\,\eta _{p}(-c)\sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}G(\eta _{p})\right) ,\;\mathrm{{if}}\;t\;\;\mathrm{{is\;odd}}. \end{array} \right. \end{aligned}$$
  3. (3)

    If m is odd and \(k>t/4\), then

    $$\begin{aligned} n_{2k,c}=&\left\{ \begin{array}{ll} \displaystyle \frac{(p^{m}-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\left( -\sum ^{\frac{4k-t}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}\right. \\ \left. \displaystyle +\,\eta _{p}(-c)\sum ^{\frac{4k-t}{2}-1}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}G(\eta _{p})\right) ,\;\mathrm{{if}}\;t\;\mathrm{{is\;even}},\\ \displaystyle \frac{(p^{m}-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\left( -\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}\right. \\ \left. \displaystyle +\,\eta _{p}(-c)\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}G(\eta _{p})\right) ,\;\;\mathrm{{if}}\;t\;\mathrm{{is\;odd}}.\\ \end{array} \right. \end{aligned}$$
  4. (4)

    If m is odd, \(t\equiv 0\pmod {4}\) and \(k=t/4\), then

    $$\begin{aligned} n_{2k,c}=n_{\frac{t}{2},c}&=\frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{\frac{t}{2}}. \end{aligned}$$

Proof

By the orthogonal property of additive characters, we have

$$\begin{aligned} n_{2k,c}=&\sum _{a_{1},\ldots ,a_{t} \in \mathbb {F}_{q}^{*}}\frac{1}{p}\sum _{y \in \mathbb {F}_{p}}\zeta _{p}^{y({\mathrm {Tr}}_{m}(\alpha a_{1}^{2}+\alpha a_{2}^{2}+\cdots +\alpha a_{2k}^{2}+a_{2k+1}^{2}+\cdots +a_{t}^{2})-c)}\\ =&\sum _{a_{1},\ldots ,a_{t} \in \mathbb {F}_{q}^{*}}\frac{1}{p}\left( \sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{y({\mathrm {Tr}}_{m}(\alpha a_{1}^{2}+\alpha a_{2}^{2}+\cdots +\alpha a_{2k}^{2}+a_{2k+1}^{2}+\cdots +a_{t}^{t})-c)}+1\right) \\ =&\frac{(q-1)^{t}}{p}+\frac{1}{p}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\sum _{a_{1},\ldots ,a_{t} \in \mathbb {F}_{q}^{*}}\zeta _{p}^{{\mathrm {Tr}}_{m}(y\alpha a_{1}^{2})}\cdots \zeta _{p}^{{\mathrm {Tr}}_{m}(y\alpha a_{2k}^{2})}\zeta _{p}^{{\mathrm {Tr}}_{m}(ya_{2k+1}^{2})}\cdots \zeta _{p}^{{\mathrm {Tr}}_{m}(ya_{t}^{2})}\\ =&\frac{(q-1)^{t}}{p}+\frac{1}{p}\left( \sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\left( \sum _{a_{1}\in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(y\alpha a_{1}^{2})}-1\right) \cdots \left( \sum _{a_{2k}\in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(y\alpha a_{2k}^{2})}-1\right) \right. \\&\left. \times \,\left( \sum _{a_{2k+1}\in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(ya_{2k+1}^{2})}-1\right) \cdots \left( \sum _{a_{t}\in \mathbb {F}_{q}}\zeta _{p}^{{\mathrm {Tr}}_{m}(y a_{t}^{2})}-1\right) \right) . \end{aligned}$$

It follows from Lemma 2.2 that

$$\begin{aligned} n_{2k,c}=\frac{(q-1)^{t}}{p}+\frac{1}{p}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}(\eta (\alpha y)G(\eta )-1)^{2k}(\eta (y)G(\eta )-1)^{t-2k}. \end{aligned}$$
(7)

Now, if m is even, then we have

$$\begin{aligned} n_{2k,c}=\frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )+1)^{2k}(G(\eta )-1)^{t-2k}. \end{aligned}$$

Suppose that m is odd and \(k<t/4\). Then by (7) we have

$$\begin{aligned} n_{2k,c}=\frac{(q-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{2k}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\left( \sum ^{t-4k}_{i=0}\left( {\begin{array}{c}t-4k\\ i\end{array}}\right) \eta _{p}(y)^{i}G(\eta )^{i}(-1)^{t-4k-i}\right) . \end{aligned}$$
(8)

If t is even, then it follows from (8) that

$$\begin{aligned} n_{2k,c}=&\frac{(q-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{2k}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\left( \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}\right. \\&\left. +\sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) \eta _{p}(y)G(\eta )^{2i+1}(-1)\right) \\ =&\frac{(q-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{2k}\left( (-1)\sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}\right. \\&\left. +(-1)\sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}\eta _{p}(y)\right) . \end{aligned}$$

Thus, we get the desired result.

It is similar to give the proof when t is odd or m is odd for \(k>t/4\). Finally, if m is odd, \(t\equiv 0\pmod {4}\) and \(k=t/4\), it follows from (7) that

$$\begin{aligned} n_{2k,c}=n_{\frac{t}{2},c}&=\frac{(q-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{\frac{t}{2}}\sum _{y \in \mathbb {F}^{*}_{p}}\zeta _{p}^{-yc}=\frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{\frac{t}{2}}. \end{aligned}$$

\(\square \)

Lemma 3.7

For \(i,j\in \{-1,1\},\) let

$$\begin{aligned} n_{i,j}=|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} : \eta (A)=i\;\mathrm{and}\;\eta _{p}(-{\mathrm {Tr}}_{m}(B))=j\}| \end{aligned}$$

Then we have

$$\begin{aligned} n_{1,1}=\frac{1}{2^{t}}\frac{p-1}{2}\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) n_{2i,-1}\;\mathrm{and}\; n_{1,-1}=\frac{1}{2^{t}}\frac{p-1}{2}\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) n_{2i,-\beta }, \end{aligned}$$

where \(\beta =\alpha ^{\frac{q-1}{p-1}}\). Moreover, if tm is even, then \(n_{1,1}=n_{1,-1}.\)

Proof

For \(j\in \{-1,1\}\), we have

$$\begin{aligned} \displaystyle n_{1,j}=&|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} : \eta (A)=1\;\mathrm{and}\;\eta _{p}(-{\mathrm {Tr}}_{m}(B))=j\}|\nonumber \\ =&|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} : A\in C_{0}^{(2,q)},\;\eta _{p}(-{\mathrm {Tr}}_{m}(B))=j\}|\nonumber \\ =&\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) |\{a_{1},\ldots ,a_{2i}\in C_{1}^{(2,q)}, a_{2i+1},\ldots ,a_{t}\in C_{0}^{(2,q)} :\;\eta _{p}(-{\mathrm {Tr}}_{m}(B))=j\}|\nonumber \\ =&\frac{1}{2^{t}}\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) |\{b_{1},\ldots ,b_{t}\in \mathbb {F}^{*}_{q} : \;\eta _{p}(-{\mathrm {Tr}}_{m}(\alpha b^{2}_{1}+\alpha b^{2}_{2}+\cdots +\alpha b^{2}_{2[\frac{t}{2}]}\nonumber \\&+b^{2}_{2[\frac{t}{2}]+1}+\cdots +b^{2}_{t})=j\}|. \end{aligned}$$

By Lemma 3.6 we have

$$\begin{aligned} \displaystyle n_{1,1}&=\frac{1}{2^{t}}\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) \sum _{c \in C_{0}^{(2,p)}}n_{2i,-c}=\frac{1}{2^{t}}\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) \frac{p-1}{2}n_{2i,-1}.\\ \mathrm{and}\\ n_{1,-1}&=\frac{1}{2^{t}}\sum ^{[\frac{t}{2}]}_{i=0}\left( {\begin{array}{c}t\\ 2i\end{array}}\right) \sum _{c \in C_{0}^{(2,p)}}n_{2i,-\beta } \end{aligned}$$

If m is even, from Lemma 3.6, then it is easy to see that \(n_{2k,c}\) are independent of \(c \in \mathbb {F}^{*}_{p}\). Thus \(n_{2k,-1}=n_{2k,-\beta }\) and so \(n_{1,1}=n_{1,-1}.\)

Next assume that m is odd and \(t\equiv 2\pmod 4\). By Lemma 3.6 we have

$$\begin{aligned} n_{1,1}&=\frac{1}{2^{t}}\frac{p-1}{2}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) n^{'}_{2k,-1}+\sum ^{\frac{t}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) n^{'}_{2k,-1}\right) \\&=\frac{1}{2^{t}}\frac{p-1}{2}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k}\right. \right. \\&\quad \left. \times \left( \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}+G(\eta _{p}\right) \sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1})\right\} \\&\quad +\,\sum ^{\frac{t}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\right. \\&\quad \left. \left. \times \,\left( \sum ^{\frac{4k-t}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}-G(\eta _{p})\sum ^{\frac{4k-t}{2}-1}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \right) . \end{aligned}$$

By changing k with \(\frac{t}{2}-k\) in the second summation we have

$$\begin{aligned} n_{1,1}&=\frac{1}{2^{t}}\frac{p-1}{2}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k}\right. \right. \\&\quad \times \,\left( \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}+G(\eta _{p})\sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1})\right\} \\&\quad +\sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k}\right. \\&\quad \left. \left. \times \left( \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}-G(\eta _{p})\sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \right) \\&=\frac{p-1}{2^{t}} \left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k} \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}\right\} \right) . \end{aligned}$$

For \(n_{1,-1}\), we similarly have

$$\begin{aligned} n_{1,-1}=&\frac{1}{2^{t}}\frac{p-1}{2}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(q-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k}\right. \right. \\&\left. \times \left( \sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}-G(\eta _{p})\sum ^{\frac{t-4k}{2}-1}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \\&+\sum ^{\frac{t}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(q-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\right. \\&\left. \left. \times \left( \sum ^{\frac{4k-t}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}+G(\eta _{p})\sum ^{\frac{4k-t}{2}-1}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \right) . \end{aligned}$$

By changing k with \(\frac{t}{2}-k\) in the second summation we have

$$\begin{aligned} n_{1,-1}=&\frac{p-1}{2^{t}}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{2k}\sum ^{\frac{t-4k}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}\right\} \right) . \end{aligned}$$

Thus, \(n_{1,1}=n_{1,-1}.\) It is similar to get the desired results when m is odd and \(t\equiv 0\pmod 4\). This completes the proof. \(\square \)

Lemma 3.8

For \(i\in \{-1,1\}\), let

$$\begin{aligned} s_{i}=|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} : \eta (A)\eta _{p}(-{\mathrm {Tr}}_{m}(B))=i\}| \end{aligned}$$
  1. (1)

    If tm is even, then we have

    $$\begin{aligned} s_{1}=s_{-1}=\frac{p-1}{2p}\big ((p^{m}-1)^{t}-(-1)^{t}\big ). \end{aligned}$$
  2. (2)

    If tm is odd, then we have

    $$\begin{aligned} s_{\pm 1}=&\pm \frac{p-1}{2^{t}}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{1}{p}(G(\eta )^{2}-1)^{2k}\sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}G(\eta _{p})\right\} \right. \\&\left. +\sum ^{\frac{t-1}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}G(\eta _{p})\right\} \right) \\&+\frac{p-1}{2p}\big ((p^{m}-1)^{t}-(-1)^{t}\big ). \end{aligned}$$

Proof

It is easy to see that \(s_{1}=n_{1,1}+n_{-1,-1}=n_{1,1}+T-n_{1,-1},\) where \(T=|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} :\eta _{p}(-{\mathrm {Tr}}_{m}(B))=-1\}|.\) By Lemma 3.4 we have

$$\begin{aligned} T=&|\{a_{1},\ldots ,a_{t}\in \mathbb {F}^{*}_{q} : -{\mathrm {Tr}}_{m}(B) \in C^{(2,p)}_{1}\}|\\ =&\sum _{c \in C^{(2,p)}_{1}}n^{'}_{-c}=\frac{p-1}{2p}\big ((p^{m}-1)^{t}-(-1)^{t}\big ). \end{aligned}$$

Similarly, we have \(s_{-1}=n_{1,-1}+T-n_{1,1}.\) If tm is even, then by Lemma 3.7, we get the desired result.

Next, if tm is odd, then by Lemmas 3.6 and 3.7 we have

$$\begin{aligned} n_{1,1}=&\frac{1}{2^{t}}\frac{p-1}{2}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{2k}\right. \right. \\&\left. \times \left( \sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}+G(\eta _{p})\sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \\&+\sum ^{\frac{t-1}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\right. \\&\left. \left. \times \left( -\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}+G(\eta _{p})\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \right) ,\\ n_{1,-1}=&\frac{1}{2^{t}}\frac{p-1}{2}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}+\frac{1}{p}(G(\eta )^{2}-1)^{2k}\right. \right. \\&\left. \left. \times \left( \sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i\end{array}}\right) G(\eta )^{2i}-G(\eta _{p})\sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \right) \\&+\sum ^{\frac{t-1}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{(p^{m}-1)^{t}}{p}-\frac{1}{p}(G(\eta )^{2}-1)^{t-2k}\right. \\&\left. \left. \times \left( \sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i\end{array}}\right) G(\eta )^{2i}+G(\eta _{p})\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) G(\eta )^{2i+1}\right) \right\} \right) . \end{aligned}$$

Now, it is easy to get \(s_{1}\) and \(s_{-1}\). This completes the proof. \(\square \)

Theorem 3.9

Let \(\mathcal {C}_{D}\) be the linear code defined by (1) and (2), where \(D=\{(x_{1},x_{2},\ldots ,x_{t}) \in \mathbb {F}_{q}^{t}\setminus \{(0,0,\ldots ,0)\} : {\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})=0\}\) and \(\rho \in \mathbb {F}_{p}^{*}\). Then \(\mathcal {C}_{D}\) is a \([p^{tm-1}-1,tm]\) linear code.

  1. (1)

    If m is even, then the complete weight enumerator of \(\mathcal {C}_{D}\) is given as follows:

    $$\begin{aligned}&N_{\rho }=0\;\mathrm {occurs}\;1\;\mathrm {time,}\\&N_{\rho }=p^{tm-2}\pm p^{m(t-\frac{k}{2})-2}\;(0<k<t)\;\mathrm{{occurs}}\;\left( {\begin{array}{c}t\\ k\end{array}}\right) \frac{(p^{m}-1)^{k}}{2}\;\mathrm{{times,}}\\&N_{\rho }=p^{tm-2}\pm p^{\frac{tm-2}{2}}\;\mathrm{{occurs}}\;\frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)\big ((-1)^{t}\mp p^{\frac{tm}{2}}\big )\big )\;\mathrm{{times,}}\\&N_{\rho }=p^{tm-2}\pm p^{\frac{tm-2}{2}}\eta _{p}(\rho )\;\mathrm{{occurs}}\;\frac{p-1}{2p}\big ((p^{m}-1)^{t}-(-1)^{t}\big )\;\mathrm{{times.}} \end{aligned}$$
  2. (2)

    If m is odd and t is even, then the complete weight enumerator of \(\mathcal {C}_{D}\) is given as follows:

    $$\begin{aligned}&N_{\rho }=0\;\mathrm {occurs}\;1\;\mathrm {time,}\\&N_{\rho }=p^{tm-2}\pm p^{m(t-\frac{k}{2})-2}\;(0<k<t\;\mathrm{{and}}\;k\;\mathrm{{is\;even}})\;\mathrm{{occurs}}\;\left( {\begin{array}{c}t\\ k\end{array}}\right) \frac{(p^{m}-1)^{k}}{2}\;\mathrm {times,}\\&N_{\rho }=p^{tm-2}\pm p^{m(t-\frac{k}{2})-\frac{3}{2}}\eta _{p}(\rho )\;(0<k<t\;\mathrm{{and}}\;k\;\mathrm{{is\;odd}})\;\mathrm{{occurs}}\;\left( {\begin{array}{c}t\\ k\end{array}}\right) \frac{(p^{m}-1)^{k}}{2}\;\mathrm {times,}\\&N_{\rho }=p^{tm-2}\pm p^{\frac{tm-2}{2}}\;\mathrm{{occurs}}\;\frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)\big ((-1)^{t}\mp p^{\frac{tm}{2}}\big )\big )\;\mathrm {times,}\\&N_{\rho }=p^{tm-2}\pm p^{\frac{tm-2}{2}}\eta _{p}(\rho )\;\mathrm{{occurs}}\;\frac{p-1}{2p}\big ((p^{m}-1)^{t}-(-1)^{t}\big )\;\mathrm {times.} \end{aligned}$$
  3. (3)

    If m is odd and t is odd, then the complete weight enumerator of \(\mathcal {C}_{D}\) is given as follows:

    $$\begin{aligned}&N_{\rho }=0\;\mathrm {occurs}\;1\;\mathrm {time,}\\&N_{\rho }=p^{tm-2}\pm p^{m(t-\frac{k}{2})-2}\;(0<k<t\;\mathrm{{and}}\;k\;\mathrm{{is\;even}})\;\mathrm{{occurs}}\;\left( {\begin{array}{c}t\\ k\end{array}}\right) \frac{(p^{m}-1)^{k}}{2}\;\mathrm {times,}\\&N_{\rho }=p^{tm-2}\pm p^{m(t-\frac{k}{2})-\frac{3}{2}}\eta _{p}(\rho )\;(0<k<t\;\mathrm{{and}}\;k\;\mathrm{{is\;odd}})\;\mathrm{{occurs}}\;\left( {\begin{array}{c}t\\ k\end{array}}\right) \frac{(p^{m}-1)^{k}}{2}\;\mathrm {times,}\\&N_{\rho }=p^{tm-2}\pm p^{\frac{tm-1}{2}}\eta _{p}(\rho )\;\mathrm{{occurs}}\;\frac{1}{2p}\big ((p^{m}-1)^{t}+(p-1)(-1)^{t}\big )\;\mathrm {times,}\\&N_{\rho }=p^{tm-2}\pm (-1)^{\frac{(tm+1)(p-1)}{4}}p^{\frac{tm-3}{2}}\;\mathrm {occurs}\\&\mp \frac{p-1}{2^{t}}\left( \sum ^{[\frac{t}{4}]}_{k=0}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{1}{p}\big ((-1)^{\frac{m(p-1)}{2}}p^{m}-1\big )^{2k}\sum ^{\frac{t-4k-1}{2}}_{i=0}\left( {\begin{array}{c}t-4k\\ 2i+1\end{array}}\right) (-1)^{\frac{((2i+1)m+1)(p-1)}{4}}p^{\frac{(2i+1)m+1}{2}} \right\} \right. \\&\left. \quad +\sum ^{\frac{t-1}{2}}_{k=[\frac{t}{4}]+1}\left( {\begin{array}{c}t\\ 2k\end{array}}\right) \left\{ \frac{1}{p}\big ((-1)^{\frac{m(p-1)}{2}}p^{m}-1\big )^{t-2k}\sum ^{\frac{4k-t-1}{2}}_{i=0}\left( {\begin{array}{c}4k-t\\ 2i+1\end{array}}\right) (-1)^{\frac{((2i+1)m+1)(p-1)}{4}}p^{\frac{(2i+1)m+1}{2}}\right\} \right) \\&\quad +\frac{p-1}{2p}\big ((p^{m}-1)^{t}-(-1)^{t}\big )\;\mathrm {times.} \end{aligned}$$

Proof

Recall that \(N_{\rho }=p^{tm-2}+\frac{1}{p^{2}}(\Omega _{1}+\Omega _{2}+\Omega _{3})\). We employ Lemmas 3.2 and 3.3 to compute \(N_{\rho }\). As computations for frequencies are done by Lemmas 3.4, 3.5, 3.6, 3.7 and 3.8 it is sufficient to give a proof for even m.

Suppose that there are exactly k elements \(a_{i_{1}},\ldots ,a_{i_{k}}\ne 0\) among \(a_{1},\ldots ,a_{t}\) for \(1\le k\le t\).

If \(1\le k \le t-1\), then we obtain

$$\begin{aligned} \displaystyle N_{\rho }=&\left\{ \begin{array}{ll} p^{tm-2}-\frac{1}{p^{2}}q^{t-k}G(\eta )^{k}, &{}\quad \mathrm{if}\;a_{i_{1}}\cdots a_{i_{k}}\in C_{0}^{(2,q)},\\ p^{tm-2}+\frac{1}{p^{2}}q^{t-k}G(\eta )^{k}, &{}\quad \mathrm{if}\;a_{i_{1}}\cdots a_{i_{k}}\in C_{1}^{(2,q)}. \end{array} \right. \end{aligned}$$

In this case, the frequencies are both \(\displaystyle \left( {\begin{array}{c}t\\ k\end{array}}\right) \frac{(q-1)^{k}}{2}.\)

If \(k=t\) and \({\mathrm {Tr}}_{m}(B)=0\), then

$$\begin{aligned} \displaystyle N_{\rho }=&p^{tm-2}+\frac{1}{p^{2}}\big (-\eta (A)G(\eta )^{t}-(p-1)\eta (A)G(\eta )^{t}\big )\\ =&p^{tm-2}-\frac{1}{p}\eta (a_{1}\cdots a_{t})G(\eta )^{t}. \end{aligned}$$

Thus,

$$\begin{aligned} \displaystyle N_{\rho }=&\left\{ \begin{array}{ll} p^{tm-2}-\frac{1}{p}G(\eta )^{t}, &{} \quad \mathrm{if}\; \eta (A)=1\;\mathrm{{and}}\;{\mathrm {Tr}}_{m}(B)=0,\\ p^{tm-2}+\frac{1}{p}G(\eta )^{t}, &{} \quad \mathrm{if}\; \eta (A)=-1\;\mathrm{{and}}\;{\mathrm {Tr}}_{m}(B)=0. \end{array} \right. \end{aligned}$$

Now the frequencies follow from Lemma 3.5.

If \(k=t\) and \({\mathrm {Tr}}_{m}(B)\ne 0\), then

$$\begin{aligned} \displaystyle N_{\rho }=&p^{tm-2}+\frac{1}{p^{2}}\big (-\eta (A)G(\eta )^{t}+G(\eta )^{t}\eta (A)\big (p\eta _{p}(-{\mathrm {Tr}}_{m}(B))\eta _{p}(\rho )+1\big )\big )\\ =&p^{tm-2}+\frac{1}{p}\eta (A)G(\eta )^{t}\eta _{p}(-{\mathrm {Tr}}_{m}(B))\eta _{p}(\rho ). \end{aligned}$$

Thus,

$$\begin{aligned} \displaystyle N_{\rho }=&\left\{ \begin{array}{ll} p^{tm-2}+\frac{1}{p}G(\eta )^{t}\eta _{p}(\rho ), &{} \mathrm{if}\; \eta (A)\eta _{p}(-{\mathrm {Tr}}_{m}(B))=1\\ &{} \mathrm{{and}}\;{\mathrm {Tr}}_{m}(B)\ne 0,\\ p^{tm-2}-\frac{1}{p}G(\eta )^{t}\eta _{p}(\rho ), &{} \mathrm{if}\; \eta (A)\eta _{p}(-{\mathrm {Tr}}_{m}(B))=-1\\ &{} \mathrm{{and}}\;{\mathrm {Tr}}_{m}(B)\ne 0. \end{array} \right. \end{aligned}$$

Now the frequencies follow from Lemma 3.7. \(\square \)

In fact, when \(t=1\), the complete weight enumerators of \(\mathcal {C}_{D}\) were given by [17]. Thus Theorem 3.9 can be viewed as a generalization of the results in [17]. From Theorem 3.9 we can also get the weight enumerators of \(\mathcal {C}_{D}\) directly.

Corollary 3.10

Let \(\mathcal {C}_{D}\) be a linear code defined by (1) and (2),  where \(D = \{(x_{1},x_{2},\ldots ,x_{t}) \in \mathbb {F}_{q}^{t}\setminus \{(0,0,\ldots ,0)\} : {\mathrm {Tr}}_{m}(x_{1}+x_{2}+\cdots +x_{t})=0\}.\)

  1. (1)

    If m is even, then the weight distribution of \(\mathcal {C}_{D}\) is given by Table 1.

  2. (2)

    If m is odd and t is even, then the weight distribution of \(\mathcal {C}_{D}\) is given by Table 2.

  3. (3)

    If m is odd and t is odd, then the weight distribution of \(\mathcal {C}_{D}\) is given by Table 3.

Table 1 The weight distribution of \(\textit{C}_{D}\) for even m
Table 2 The weight distribution of \(\textit{C}_{D}\) for odd m and even t
Table 3 The weight distribution of \(\textit{C}_{D}\) for odd m and odd t, where \(s_{\pm 1}\) is given by Lemma 3.8(2)

Remark 3.11

By Corollary 3.10, we easily get several linear codes with a few weights. For example, we obtain 3-weight linear codes for \(m=2\) and \(t=2\), and 5-weight linear codes for even \(m\ge 4\), \(t=2\) and \(m=2\), \(t=3\). We also have 3-weight linear codes for odd m, \(t=2\), and 5-weight linear codes for odd m, \(t=3,4\).

Example 3.12

  1. (1)

    Let \(p=3, m=2,\) and \(t=3.\) Then \(q=9\) and \(n=242.\) By Theorem 3.9, the code \(\textit{C}_{D}\) is a [242, 6, 108] linear code. Its complete weight enumerator is

    $$\begin{aligned}&z^{242}_{0}+12z_{0}^{134}(z_{1}z_{2})^{54}+190z_{0}^{98}(z_{1}z_{2})^{72}+171z_{0}^{80}z_{1}^{72}z_{2}^{90}+171z_{0}^{80}z_{1}^{90}z_{2}^{72}\\&\quad +172z_{0}^{62}(z_{1}z_{2})^{90}+12z^{26}_{0}(z_{1}z_{2})^{108}, \end{aligned}$$

    and its weight enumerator is

    $$\begin{aligned} 1+12x^{108}+190x^{144}+342x^{162}+172x^{180}+12x^{216}, \end{aligned}$$

    which are checked by Magma.

  2. (2)

    Let \(p=3, m=3,\) and \(t=3.\) Then \(q=27\) and \(n=6560.\) By Theorem 3.9, the code \(\textit{C}_{D}\) is a [6560, 9, 4212] linear code. Its complete weight enumerator is

    $$\begin{aligned}&z^{6560}_{0}+1014z_{0}^{2348}(z_{1}z_{2})^{2106}+5940z^{2240}_{0}(z_{1}z_{2})^{2160}+39z^{2186}_{0}z_{1}^{1458}z_{2}^{2916}\\&\quad +39z_{0}^{2186}z_{1}^{2916}z_{2}^{1458}+2929z^{2186}_{0}z_{1}^{2106}z_{2}^{2268}+2929z^{2186}_{0}z_{1}^{2268}z_{2}^{2106}\\&\quad +5778z^{2132}_{0}(z_{1}z_{2})^{2214}+1014z_{0}^{2024}(z_{1}z_{2})^{2268}, \end{aligned}$$

    and its weight enumerator is

    $$\begin{aligned} 1+1014x^{4212}+5940x^{4320}+5936x^{4374}+5778x^{4428}+1014x^{4536}, \end{aligned}$$

    which are checked by Magma.