1 Introduction

Cyclic codes [23] are an important class of linear codes because of their richness in algebraic structure and ease in encoding and decoding. Their structure is now well known over finite chain rings [25]. Constacyclic codes are one of the important generalizations of cyclic codes. They have been extensively studied over finite commutative rings [1, 9, 10, 19, 22, 26].

Recently, Yildiz and Karadeniz [32] have studied cyclic codes over the ring \(\mathrm {R}={\mathbb {F}}_2+u{\mathbb {F}}_2+v{\mathbb {F}}_2+uv{\mathbb {F}}_2,\ u^2=v^2=0\). They have derived the generator polynomials of cyclic codes over \(\mathrm {R}\) and obtained some good binary codes as the images of these codes under two Gray maps. They have also studied \((1+v)\)-constacyclic codes over \(\mathrm {R}\) of odd length and showed that the Gray images of these codes are cyclic codes over \({\mathbb {F}}_2+u{\mathbb {F}}_2\) [17]. Yu et al. [16] have proved that the image of a \((1-uv)\)-constacyclic code of length n over \({\mathbb {F}}_p + u{\mathbb {F}}_p + v{\mathbb {F}}_p + uv{\mathbb {F}}_p\) under a Gray map is a distance invariant quasi-cyclic code of index \(p^2\) and length \(p^3n\) over \({\mathbb {F}}_p\). More recently, Shi et al. [21, 31] have studied some weight codes from trace codes over \({\mathbb {F}}_p+u{\mathbb {F}}_p+v{\mathbb {F}}_p+uv{\mathbb {F}}_p\). Shi et al. [30] have constructed two new infinite families of trace codes of dimension 2m over the ring \({\mathbb {F}}_p+u{\mathbb {F}}_p\), with \(u^2 = u\), when p is an odd prime. Kai et al. [18] have considered \((1+u)\)-constacyclic codes of arbitrary length over \(\mathrm {R}\) and determined their generator polynomials using the generators of \((1+u)\)-constacyclic codes over \({\mathbb {F}}_2+u{\mathbb {F}}_2\), with \(u^2=0\). Martínez-Moro and Szabo [24] have studied codes over all commutative rings with 16 elements. Dougherty et al. [11] have studied cyclic codes over commutative local Frobenius rings of order 16 and proved that the binary images of cyclic codes are quasi-cyclic codes of index 4. In [7], all non-chain, Frobenius rings with cardinality \(p^4\), where p is a prime, are given and some results on codes over these rings are presented. Also, in [8], duals of constacyclic codes over a class of Frobenius rings are studied.

In this paper, we determine the structure of \((1+\lambda u)\)-constacyclic codes over \(\mathrm {R}\) and their annihilators by projecting them onto a class of constacyclic codes over \({\mathbb {F}}_2+u{\mathbb {F}}_2,u^2=0\). We give a complete classification of \((1+\lambda u)\)-constacyclic codes and their annihilators over \(\mathrm {R}\). The number of \((1+\lambda u)\)-constacyclic codes over \(\mathrm {R}\) that are either contained in, or are equal to their annihilators, is enumerated.

Quasi-cyclic codes (QC) are another important generalization of cyclic codes. QC codes over finite fields are closely related to convolutional codes [12]. These codes are significant as they are asymptotically good and meet a modified version of Gilbert–Varshamov bound [20]. Quasi-cyclic and generalized quasi-cyclic codes have been studied over various finite rings [2, 4,5,6, 13, 14, 27, 28].

Polynomial factorization plays an important role in the study of cyclic as well as QC codes. Since \(\mathrm {R}\) contains both \({\mathbb {F}}_2+u{\mathbb {F}}_2,\ u^2=0\), and \({\mathbb {F}}_2\) properly, the factorization of a polynomial over these rings is still valid over \(\mathrm {R}\). Recently, Siap et al. [29] have studied 1- generator QC codes over the ring \({\mathbb {F}}_2+u{\mathbb {F}}_2,\ u^2=0\), where they have presented the structure of these codes and obtained a minimal spanning set for them. In [3], Aydin et al. have studied 1-generator QC codes over \(\mathrm {R}\) and have found sixteen new binary optimal codes. Motivated by the study of Siap et al. [29], in this paper we consider a class of 1-generator QC codes over the ring \(\mathrm {R}\) and generalize the results of [29]. We present the structure of 1-generator QC codes over \(\mathrm {R}\) and obtain a minimal spanning set for these codes. We also determine a BCH-type lower bound on the minimum distance for these codes.

The paper is organized as follows. In Sect. 2, we give basic definitions and notations. In Sect. 3, the complete structure of \((1+\lambda u)\)-constacyclic codes of length \(2^k\) over \(\mathrm {R}\) is determined. In Sect. 4, we have obtained the structure of the annihilators of \((1 + \lambda u)\)-constacyclic codes of length \(2^k\) over \(\mathrm {R}\). In Sect. 5, mass formulas for the number of constacyclic codes of length \(2^k\) over \(\mathrm {R}\) that are either contained in, or are equal to their annihilators, are presented. In Sect. 6 we determine a generating set for a class of 1-generator QC codes over \(\mathrm {R}\). A sufficient condition for a family of 1-generator QC codes over \(\mathrm {R}\) to be free is given. In Sect. 7, we generalize the results obtained in Sect. 6 to 1-generator GQC codes over \(\mathrm {R}\).

2 Preliminaries

Let \(\mathrm {R}\) denote the commutative ring \({\mathbb {F}}_2+u{\mathbb {F}}_2+v{\mathbb {F}}_2+uv{\mathbb {F}}_2\) with \(u^2=v^2=0\) and \(uv=vu\). \(\mathrm {R}\) is a natural extension of the ring \({\mathbb {F}}_2+u{\mathbb {F}}_2,\ u^2=0\). An element \(a+bu+cv+duv \in \mathrm {R}\) is a unit if and only if \(a\ne 0\). A linear code \(\textit{C}\) of length n over \(\mathrm {R}\) is an \(\mathrm {R}\)-submodule of \(\mathrm {R}^n\). \(\textit{C}\) is called free code if it has an \(\mathrm {R}\)-basis. A Gray map \(\phi :\mathrm {R}\rightarrow {\mathbb {F}}_2^4\) is defined [3] as \(\phi (a+bu+cv+duv)= (a+b+c+d, c+d,b+d,d)\) and the Lee weight of an element \(a+ub+cv+uvd\in \mathrm {R}\) is defined as \(w_\mathrm{L}(a+bu+cv+duv)= w_\mathrm{H}(a+b+c+d ,c+d,b+d,d)\), where \(w_\mathrm{H}\) denotes the Hamming weight. The Lee weight of an n-tuple in \(\mathrm {R}^n\) is defined as the rational sum of Lee weights of its components. The minimum Lee distance of a linear code \(\textit{C}\), denoted by \(d_\mathrm{L}(\textit{C})\), is defined as the minimum of the Lee weights of nonzero codewords in \(\textit{C}\). The minimum Hamming distance \(d_\mathrm{H}(\textit{C})\) of \(\textit{C}\) over \(\mathrm {R}\) is defined similarly.

The Gray map is a linear isometry. Thus, if \(\textit{C}\) is a linear code of length n over \(\mathrm {R}\) with minimum Lee distance d and size \(2^k\), then \(\phi (\textit{C})\) is a [4nkd]-binary linear code.

A linear code \(\textit{C}\) of length n is cyclic if it is closed under the cyclic shift, i.e., \((c_{n-1},c_0,\ldots ,c_{n-2})\in \textit{C}\) whenever \((c_0,c_1,\ldots ,c_{n-1})\in \textit{C}\). Identifying a codeword \((c_0,c_1,\ldots ,c_{n-1})\in \textit{C}\) with a polynomial \(c_0+c_1x+\cdots +c_{n-1}x^{n-1}\), we see that cyclic codes of length n over \(\mathrm {R}\) are precisely the ideals of \(\mathrm {R}_n=\mathrm {R}[x]/\langle x^n-1\rangle \). The complete structure of a cyclic code \(\textit{C}\) of length n over \(\mathrm {R}\) is as follows.

Theorem 1

[32] Let \(\textit{C}\) be a cyclic code of length n over \(\mathrm {R}\). Then

  1. 1.

    For even n, \(\textit{C}=\langle g_1(x)+up_1(x)+vq_1(x)+uvr_1(x),\ ua_1(x)+vq_2(x)+uvr_2(x),\ va_2(x)+uvr_3(x),\ uva_3(x)\rangle \), where \(a_3(x)|a_1(x)|g_1(x)|(x^n-1)\) and \(a_3(x)|a_2(x)|g_1(x)|(x^n-1)\) over \({\mathbb {F}}_2\).

  2. 2.

    For odd n, \(\textit{C}=\langle g_1(x)+ua_1(x),\ va_2(x)+uva_3(x)\rangle \), where \(a_3(x)|a_1(x)|g_1(x)|(x^n-1)\) and \(a_3(x)|a_2(x)| g_1(x)|(x^n-1)\) over \({\mathbb {F}}_2\).

  3. 3.

    \(\textit{C}\) is a free cyclic code if and only if \(\textit{C}= \langle g_1(x)+up_1(x)+vq_1(x)+uvr_1(x)\rangle \) and \(g_1(x)+up_1(x)+vq_1(x)+uvr_1(x)|(x^n - 1)\) in \(\mathrm {R}[x]\). Further, \(w_H(\textit{C}) = w_H\left( \langle g_1\rangle \right) \).

For a unit \(\lambda \) in \(\mathrm {R}\), C is a \(\lambda \)-constacyclic code if it is invariant under the mapping \(\tau \), given by

$$\begin{aligned}\tau (c_0, c_1, \ldots , c_{n-1}) =(\lambda c_{n-1},c_0,\ldots ,c_{n-2}), \end{aligned}$$

where \((c_0,c_1,\ldots ,c_{n-1})\in \textit{C}\). Under polynomial notation we see that, for \({\bar{c}}\in \textit{C}\), \(\tau ({\bar{c}})\) corresponds to \(x{\bar{c}}(x)\) in \(\mathrm {R}[x]/\langle x^n-\lambda \rangle \). Therefore, a linear code C of length n over \(\mathrm {R}\) is a \(\lambda \)-constacyclic code of length n if and only if \(\textit{C}\) is an ideal of \(\mathrm {R}[x]/\langle x^n-\lambda \rangle \).

The dual of a linear code C is defined as \(C^\perp = \{{\bar{x}} \in \mathrm {R}^n \mid {\bar{x}} \cdot {\bar{y}} = 0 \ \mathrm {for \ all}\ {\bar{y}} \in C\}\), where \({\bar{x}}\cdot {\bar{y}}\) is the standard Euclidean inner product. C is said to be self-orthogonal if \(C\subseteq C^\perp \), and self-dual if \(C =C^\perp \). Since \(\mathrm {R}\) is a Frobenius ring [32], we have \(|C||C^\perp |=|\mathrm {R}^n|=2^{4n}\). It is easy to see that the dual of a \(\lambda \)-constacyclic code is a \(\lambda ^{-1}\)-constacyclic code [10]. Also for any linear code \(\textit{C}\) of length n over \(\mathrm {R}\), there are two other codes associated with \(\textit{C}\), namely Tor\((\textit{C})\) and Res\((\textit{C})\) which are defined as Tor\((\textit{C})=\{{\bar{b}}\in ({\mathbb {F}}_2+u{\mathbb {F}}_2)^n \mid v{\bar{b}} \in \textit{C}\}\) and Res\((\textit{C})=\{{\bar{a}} \in ({\mathbb {F}}_2+u{\mathbb {F}}_2)^n \mid {\bar{a}}+v{\bar{b}} \in \textit{C}\ \text{ for } \text{ some } \ {\bar{b}} \in ({\mathbb {F}}_2+u{\mathbb {F}}_2)^n\}\).

Let I be an ideal in \(\mathrm {R}_n\). Then the annihilator A(I) of I is defined by \(A(I)=\{g(x)\in \mathrm {R}_n \mid f(x)g(x)=0\ \mathrm {for \ all}\ f(x)\in I\}\). The reciprocal polynomial \(f^*(x)\) of a polynomial \(f(x)=c_0+c_1x+\cdots +c_{k}x^{k}\in \mathrm {R}[x]\) is defined as \(f^*(x)=x^kf(1/x)\). We note that if \(\textit{C}\) is a \(\lambda \)-constacyclic code with the associated ideal I in \(\mathrm {R}_n\), then the associated ideal of \(\textit{C}^\perp \) is \(A(I)^*=\{f^*(x) \mid f(x)\in I\}\).

Two polynomials \(f_1(x)\) and \(f_2(x)\) in \(\mathrm {R}[x]\) are said to be relatively prime if there exist polynomials \(p_1(x),p_2(x)\in \mathrm {R}[x]\) such that \(p_1(x)f_1(x)+p_2(x)f_2(x)=1\).

Theorem 2

[3, Lemma 2] Let \(\textit{C}=\langle g(x)\rangle \) be a cyclic code of length n over \(\mathrm {R}\) such that \(g(x)|(x^n-1)\) in \(\mathrm {R}[x]/\langle x^n-1\rangle \). If \(f(x)\in \mathrm {R}\) is relatively prime to g(x), then \(\textit{C}=\langle f(x)g(x)\rangle \).

We note that if \(f_1(x)\) and \(f_2(x)\) are relatively prime over \(\mathrm {R}\), then \(\mu (f_1)(x)\) and \(\mu (f_2)(x)\) are relatively prime over \({\mathbb {F}}_2\), where \(\mu (f_i)(x)=f_i(x)\ \mathrm {mod}(u,v),\ i=1,2\).

3 \((1+\lambda u)\)-Constacyclic Codes of Length \(2^k\) Over \(\mathrm {R}\)

Let \(\lambda \) be a unit in \(\mathrm {R}\) and \(n=2^k\), where k is a positive integer. In this section, we derive the generators for \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\). Now onward, we use the notations \(\mathrm {R}_n=\frac{\mathrm {R}[x]}{\langle x^n-(1+\lambda u)\rangle }\) and \(\mathrm {\mathrm {R}}_n^\prime =\frac{({\mathbb {F}}_2+u{\mathbb {F}}_2)[x]}{\langle x^n-(1+\lambda u)\rangle }\).

Lemma 1

In \(\mathrm {R}_n\), \(\langle (x-1)^{2^k} \rangle = \langle u \rangle \) and \(x-1\) is a nilpotent element of nilpotency index 2n.

Proof

Since \(\mathrm {R}\) is of characteristic 2 and \(2 \mid \left( {\begin{array}{c}2^k\\ i\end{array}}\right) \) for \(0< i < 2^k\), we have \({(x-1)^{2^k}}=x^{2^k}-1=\lambda u\in \mathrm {R}_n\). This implies that \(\langle (x-1)^{2^k}\rangle =\langle u\rangle \). Also \(u^2=0\) implies that \(x-1\) is a nilpotent element of nilpotency index \(2n=2^{k+1}\). \(\square \)

From the definition of \(\mathrm {R}_n\), it is easy to see that each element f(x) in \(\mathrm {R}_n\) can uniquely be written as \(f(x)=a(x)+vb(x)\), where \(a(x),b(x) \in \mathrm {R}_n^\prime \). Also \(\mathrm {\mathrm {R}}_n^\prime \) is a local ring with the unique maximal ideal \(\langle x-1\rangle \), and \((x-1)\in \mathrm {R}_n^\prime \) is a nilpotent element with nilpotency index 2n [10, Lemma 4.1] which implies that a(x), b(x) can be written as \(a(x)=\sum _{i=0}^{2n-1}a_i(x-1)^i\) and \(b(x)=\sum _{i=0}^{2n-1}b_i(x-1)^i\) in \({\mathbb {F}}_2[x]/\langle x^{2n}-1\rangle \). Therefore, every polynomial f(x) in \(\mathrm {R}_n\) can be written as \(\sum _{i=0}^{2n-1}a_i(x-1)^i+v\sum _{i=0}^{2n-1}b_i(x-1)^i =\sum _{i=0}^{2n-1} c_i(x-1)^i\), where \(c_i=a_i+vb_i \in {\mathbb {F}}_2+v{\mathbb {F}}_2\).

Now we present the ideal structure of \(\mathrm {R}_n\). Observe that the ring \(\mathrm {R}_n\) is an extension of \(\mathrm {R}_n^\prime \) and the maximal ideal of \(\mathrm {R}_n\) is the extension of the maximal ideal of \(\mathrm {R}_n^\prime \). Let \(\varPhi : \mathrm {R}\rightarrow {\mathbb {F}}_2+u{\mathbb {F}}_2\) be such that \(\varPhi (a+bv)=a\), where \(a, b \in {\mathbb {F}}_2+u{\mathbb {F}}_2\). It can easily be seen that \(\varPhi \) is a ring homomorphism with \(ker(\varPhi )= \langle v\rangle \)\(=v({\mathbb {F}}_2+u{\mathbb {F}}_2)\). Extend \(\varPhi \) to the homomorphism \(\varPhi : \mathrm {R}_n \rightarrow \mathrm {R}_n^\prime \) such that \(\varPhi (a(x)+vb(x))=a(x)\), where \(a(x), b(x) \in ({\mathbb {F}}_2+u{\mathbb {F}}_2)[x]\). Since \(\varPhi \) is surjective and \(\langle x-1\rangle \) is the maximal ideal in \(\mathrm {R}_n^\prime \), the inverse image of the ideal \(\langle x-1\rangle \) in \(\mathrm {R}_n^\prime \) under \(\varPhi \) is the maximal ideal \(\langle v,x-1\rangle \) in \(\mathrm {R}_n\). Thus, we have the following result.

Theorem 3

The ring \(\mathrm {R}_n\) is a local ring with the maximal ideal \(\langle v,~ x-1\rangle \).

Lemma 2

An element \(f(x)=\sum _{i=0}^{2n-1} f_i (x-1)^i\) is a unit in \(\mathrm {R}_n\) if and only if \(f_0\) is a unit in \({\mathbb {F}}_2+v{\mathbb {F}}_2\).

Proof

Let \(f(x)=\sum _{i=0}^{2n-1} f_i (x-1)^i\) be a unit in \(\mathrm {R}_n\). Assume that \(f_0\) is a non-unit in \({\mathbb {F}}_2+v{\mathbb {F}}_2\). Then \(f_0 \in \left\langle v \right\rangle \) and therefore \(f(x)=\sum _{i=0}^{2n-1} f_i (x-1)^{i} \in \langle v,~x-1 \rangle \). This implies that f(x) is a non-unit, a contradiction. Therefore, \(f_0\) must be a unit in \({\mathbb {F}}_2+v{\mathbb {F}}_2\). Conversely suppose that \(f_0\) is a unit in \({\mathbb {F}}_2+v{\mathbb {F}}_2\) and \(f(x)=\sum _{i=0}^{2n-1} f_i (x-1)^i\) is a non-unit in \(\mathrm {R}_n\). Then \(f(x) \in \langle v,~x-1 \rangle \) and there exist \(s(x)=\sum _{i=0}^{2n-1} s_i (x-1)^i\) and \(t(x)=\sum _{i=0}^{2n-1} t_i (x-1)^i\) in \(\mathrm {R}_n\) such that \(f(x)=vs(x)+(x-1)t(x)=vs_0+(t_0+vs_1) (x-1)+(t_1+vs_2) (x-1)^2+ \cdots +(t_{2n-2}+vs_{2n-1})(x-1)^{2n-1}+t_{2n-1}(x-1)^{2n}\). On comparing constant terms, we get \(f_0=vs_0\). So \(f_0\) is a non-unit, a contradiction. Therefore, f(x) is a unit in \(\mathrm {R}_n\). \(\square \)

Theorem 4

[10, Theorem 4.2] The \((1+\lambda u)\)-constacyclic codes of length \(n=2^k\) over \({\mathbb {F}}_2+u{\mathbb {F}}_2\) are precisely the ideals \(\langle (x-1)^i \rangle \), \(0 \le i \le 2n\), of \(\frac{({\mathbb {F}}_2+u{\mathbb {F}}_2)[x]}{\left\langle x^n-(1+\lambda u) \right\rangle }\), and each ideal \(\left\langle (x-1)^i \right\rangle \) contains \(2^{(2n-i)}\) codewords.

Let C be a \((1+\lambda u)\)-constacyclic code of length \(n=2^k\) over \(\mathrm {R}\). Restrict the map \(\varPhi \) to C and denote the restriction by \(\varPhi _C\). That is \(\varPhi _{\textit{C}}:\textit{C}\rightarrow \mathrm {R}_n^\prime \) such that \(f(x)=f_1(x)+vf_2(x)\mapsto f_1(x)\). Clearly \(\varPhi _{\textit{C}}\) is an \(\mathrm {R}[x]\)-module homomorphism with kernel \(ker(\varPhi _{\textit{C}})=\{vf(x)\in \textit{C}| f_1(x)\in \mathrm {R}_n^\prime \}\). Since \(\mathrm {R}_n^\prime \) is a principal ideal ring, the set \(K=\{f(x)\in \mathrm {R}_n^\prime |vf(x)\in \textit{C}\}\) is a principal ideal. From Theorem 4, there exists a least positive integer m, \(0\le m \le 2n\), such that \(K=\langle (x-1)^m\rangle \). This implies that \(ker(\varPhi _{\textit{C}})=\langle v(x-1)^m\rangle \). Similarly, \(\varPhi _{\textit{C}}(\textit{C})\) is an ideal of \(\mathrm {R}_n^\prime \), so \(\varPhi (C)=\langle (x-1)^s\rangle \), for some s, \(1 \le s \le 2n\). Therefore, any ideal \(\textit{C}\) of \(\mathrm {R}_n\) is of the form \(\textit{C}=\langle (x-1)^s+vp(x),\ v(x-1)^m\rangle \) for some \(p(x)=\sum _{i=0}^{2n-1}p_i(x-1)^i \in R_n^\prime \). As \(v(x-1)^s= v((x-1)^s+vp(x)) \in C\), we have \(v(x-1)^s\) is in \(ker(\varPhi _C)\). This implies that \(m \le s\). Let t be the smallest integer such that \(p_t\) is nonzero. Then a polynomial \(f(x)= (x-1)^s+v \sum _{i=0}^{2n-1} p_i(x-1)^i \in \mathrm {R}[x]\) can be written as \(f(x)= (x-1)^s+v(x-1)^t h(x)\), where h(x) is zero or a unit in \(\mathrm {R}_n^\prime \) and of degree at most \(s-t-1\). Hence, \(\textit{C}\) can be written as \(\textit{C}= \langle (x-1)^s+v(x-1)^th(x),\ v(x-1)^m\rangle \), where \(1 \le s \le 2n-1\), \(0 \le t \le s-1\), \(1+t \le m \le s-1\) and \(h(x) \in \mathrm {R}_n^\prime \). We note that when \(m=s\), we have \(v(x-1)^m \in \langle (x-1)^s+vp(x)\rangle \) and therefore \(\textit{C}=\langle (x-1)^s+vp(x)\rangle \). For \(m < s\), \(\textit{C}\) is a non-trivial ideal of \(\mathrm {R}_n\) and \(\textit{C}\) has the form \(\textit{C}= \langle (x-1)^s+v\sum _{i=0}^{2n-1}p_i(x-1)^i,\ v(x-1)^m \rangle ,\ \ 1 \le s \le 2n-1~~\text{ and }~~ 0 \le m \le s-1\). Summarizing this discussion, we see that a \((1+\lambda u)\)-constacyclic code of length \(n=2^k\) over \(\mathrm {R}\) is a cyclic code of length 2n over the ring \({\mathbb {F}}_2+v{\mathbb {F}}_2,\ v^2=0\). The structure of these codes has been well studied in [9] and [10]. In this paper, we study the structure of annihilators, and their enumeration of such codes in detail.

The following theorem gives the complete structure of \((1+\lambda u)\)-constacyclic codes of length \(n=2^k\) over \(\mathrm {R}\).

Theorem 5

Let \(\textit{C}\) be a \((1+\lambda u)\)-constacyclic code of length n over \(\mathrm {R}\). Let T be the smallest nonnegative integer such that \(v(x-1)^T \in \langle (x-1)^s+v(x-1)^t h(x) \rangle \), where \(0 \le s \le 2n-1\), h(x) is zero or a unit in \(\mathrm {R}_n^\prime \) and \(\mathrm {deg}(h(x)) \le s-t-1\). Then C is one of the following:

  1. (i)

    Trivial ideals: \(\langle 0\rangle \) and \(\langle 1\rangle \).

  2. (ii)

    Principal ideals:

    1. (a)

      \(\langle v(x-1)^{m}\rangle \), \(0 \le m \le 2n-1\).

    2. (b)

      \(\langle (x-1)^s+v (x-1)^t h(x)\rangle \), where \(1 \le s \le 2n-1\), \(0 \le t \le s-1\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\) with \(\mathrm {deg}\ h(x) \le T-t-1\).

  3. (iii)

    Non-principal ideals: \(\langle (x-1)^s+v (x-1)^t h(x), \ v(x-1)^m \rangle \), where \(1 \le s \le 2n-1\), \(1+t \le m < T\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\) with \(\mathrm {deg}\ h(x) \le m-t-1\).

From Theorem 5, we have if \(t\le 2s-2n\) (or \(2n-s+t\le s\)), then \(T=2n-s+t\). Similarly, when \(2s-2n < t\), we get \(T=s\). Thus, \(T=\text{ min }\{ s, 2n-s+t \} \) i.e.

$$\begin{aligned} T={\left\{ \begin{array}{ll} 2n-s+t &{} \ \text{ if }\ 0 \le t \le 2s-2n,\\ s &{} \ \text{ if }\ 2s-2n+1 \le t \le s-1. \end{array}\right. } \end{aligned}$$
(1)

For any ideal \(\textit{C}\) of \(\mathrm {R}_n\), it is easy to show that \(\text{ ker }(\varPhi _{\textit{C}})= \text{ Tor }(\textit{C})\) and \(\varPhi _{\textit{C}}(\textit{C})=\text{ Res }(\textit{C})\). Now we consider the cardinality of a \((1+\lambda u)\)-constacyclic code \(\textit{C}\) over \(\mathrm {R}\). If |Tor \((\textit{C})|\) and |Res \((\textit{C})|\) are known, then \(|\textit{C}|\) can be computed by \(|\textit{C}|=|\text{ Tor } (\textit{C})||\text{ Res } (\textit{C})|\).

The following result determines the cardinality of \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) in each case, as given in Theorem 5.

Theorem 6

Let C be a \((1+\lambda u)\)-constacyclic code of length n over \(\mathrm {R}\). Then

  1. (a)

    If \(\textit{C}=\langle v(x-1)^{m}\rangle \), \(0 \le m \le 2n\), then \(|C|=2^{(2n-m)}\).

  2. (b)

    If \(\textit{C}=\langle (x-1)^s+v (x-1)^th(x) \rangle \), \(0 \le s \le 2n-1\), \(0 \le t \le s-1\), then

    $$\begin{aligned} |\textit{C}|= {\left\{ \begin{array}{ll} 2^{(2n-t)} &{} \text{ if }~~ n \le s \le 2n-1~\text{ and }~0 \le t < 2s-2n,\\ 2^{(4n-2s)} &{} \text{ if }~~n \le s \le 2n-1~\text{ and }~ 2s-2n+1 \le t \le s-1~~\text{ or }~~1 \le s \le n-1. \end{array}\right. } \end{aligned}$$
  3. (c)

    If \(\textit{C}=\langle (x-1)^s+v (x-1)^t h(x), ~v(x-1)^m \rangle \), where \(1 \le s \le 2n-1\), \(1+t \le m < T\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\), then \(|\textit{C}|=2^{(4n-m-s)}\).

Proof

We prove part (c). Let \(\textit{C}\) be the cyclic code given in part (c). Then \(\mathrm {Res}(\textit{C})=\langle (x-1)^s\rangle \) and \(\mathrm {Tor}(\textit{C})=\langle u(x-1)^m\rangle \). Therefore, \(|\textit{C}|=|\mathrm {Res}(\textit{C})| |\mathrm {Tor}(\textit{C})|=2^{2n-s}2^{2n-m}=2^{4n-s-m}\). \(\square \)

4 Annihilators of Constacyclic Codes Over \(\mathrm {R}\)

In this section, we determine the annihilators of \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\). The dual of a \((1+\lambda u)\)-constacyclic code is obtained by reversing the codewords of its annihilator. Thus, the annihilator and dual of a constacyclic code are equivalent codes. We also give a complete list of \((1+\lambda u)\)-constacyclic codes of length n that are either contained in, or are equal to their annihilators. To determine this type of class, we use the cardinality of \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\). In the following result, we give annihilators of the ideals as described in Theorem 5.

Theorem 7

Let I be an ideal of \(\mathrm {R}_n\) and A(I) be its annihilator.

  1. (a)

    If I= \(\langle v(x-1)^m \rangle \), where \(0 \le m \le 2n-1\), then \(A(I)=\langle (x-1)^{2n-m},~v \rangle \).

  2. (b)

    If \(I=\langle (x-1)^s+v (x-1)^t h(x) \rangle \), where \(1 \le s \le 2n-1\), \(0 \le t \le s-1\), h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\) and \(\mathrm {deg}(h(x)) \le T-t-1\), then

    $$\begin{aligned} A(I)={\left\{ \begin{array}{ll} \left\langle (x-1)^{2n-s}+ v(x-1)^{2n-2s+t} h(x) \right\rangle , &{} ~\text{ when }~ 1 \le s \le n-1~~ \text{ or }\\ &{}~n \le s \le 2n-1~\text{ and }~2s-2n+1 \le t \le s-1,\\ \left\langle (x-1)^{s-t}+vh(x), ~v(x-1)^{2n-s} \right\rangle , &{} ~\text{ when }~n \le s \le 2n-1~\text{ and }~0 \le t \le 2s-2n. \\ \end{array}\right. } \end{aligned}$$
  3. (c)

    If \(I=\langle (x-1)^{s}+v(x-1)^th(x) ,~v(x-1)^m \rangle \), where \(1 \le s \le 2n-1\), \(0 \le t < s\), \( 1+t \le m < T\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\), then

    $$\begin{aligned} A(I)= {\left\{ \begin{array}{ll} \left\langle (x-1)^{2n-s}+ v (x-1)^{2n-s-m+t} h(x), ~v(x-1)^{2n-s} \right\rangle , &{} \text{ when }~ 1 \le s \le n-1~ \text{ or } \ n \le s \le \\ {} &{}~ 2n-1 \text{ and }\ s+m-2n \le t \le s-1,\\ \left\langle (x-1)^{s-t}+vh(x), ~v(x-1)^{2n-s} \right\rangle , &{} \text{ when }~n \le s \le 2n-1~\text{ and } \\ &{}~ ~0 \le t \le s+m-2n.\\ \end{array}\right. } \end{aligned}$$

Proof

  1. (a)

    Let I= \(\langle v(x-1)^m \rangle \), \(1 \le m \le 2n-1\). Suppose \(A(I)=\langle g(x),~v(x-1)^j \rangle \), where \(g(x)=(x-1)^i+vq(x)\), \(q(x) \in \mathrm {R}_n^{\prime }\), \(0 \le j \le i-1\). Since \(g(x) \in A(I)\), we have \(v(x-1)^mg(x)=0\). This implies that \(v(x-1)^{m+i}=0\), and therefore, \(m+i \ge 2n\). Thus, \(2n-m \le i\). Since \(x-1\) is a nilpotent element of nilpotency index 2n, there is no integer l such that \(l < 2n-m\) and \((x-1)^{l+m}=0\). Therefore, \(i=2n-m\) and \(g(x)=(x-1)^{2n-m}+vq(x)\). Also since \(v \in A(I)\), it is easy to see that \(j=0\). Therefore, \(A(I)=\langle (x-1)^{2n-m}+vq(x),~v \rangle =\langle (x-1)^{2n-m},~v \rangle \).

  2. (b)

    Let \(I=\langle f(x) \rangle \), where \(f(x)=(x-1)^{s}+v(x-1)^th(x) \), \(1 \le s \le 2n-1\). Suppose \(A(I)=\langle g(x),~v(x-1)^j \rangle \), where \(g(x)=(x-1)^i+vq(x)\), \(q(x) \in \mathrm {R}_n^{\prime }\), \(0 \le j \le i-1\). Since \(g(x) \in A(I)\), we have \(f(x)g(x)=((x-1)^i+vq(x))((x-1)^{s}+v(x-1)^th(x))=0\). This implies that \(i \ge 2n-s\), and

    $$\begin{aligned} (x-1)^s q(x)+(x-1)^{i+t} h(x)=0. \end{aligned}$$
    (2)

    Now suppose that \(i=2n-s\). Then from (2), we get

    $$\begin{aligned} (x-1)^s q(x)+(x-1)^{2n-s+t} h(x)=0. \end{aligned}$$
    (3)

    When \(s < n\), we have \(s < 2n-s+t\). So from (3), we get \(q(x)=(x-1)^{2n-2s+t} h(x)\). Therefore, \(g(x)=(x-1)^{2n-s}+v(x-1)^{2n-2s+t}h(x)\). Hence,

    $$\begin{aligned} A(I)=\left\langle (x-1)^{2n-s}+v(x-1)^{2n-2s+t} h(x), v(x-1)^j \right\rangle . \end{aligned}$$

    As \(j < i\), we have \(j < 2n-s\). But no l such that \(l < 2n-s\) satisfies \(v(x-1)^lf(x)=0\). Thus,

    $$\begin{aligned} A(I)=\left\langle (x-1)^{2n-s}+v(x-1)^{2n-2s+t} h(x) \right\rangle . \end{aligned}$$

    When \(n \le s \le 2n-1\), we get \(2n-s+t \ge s\) only if \(t \ge 2s-2n\). In this case we get from (3) that \(q(x)=(x-1)^{2n-2s+t} h(x)\). If \(t < 2s-2n\), then \(2n-s+t < s\). Again from (3), we get \((x-1)^{2n-s+t}(h(x) + q(x)(x-1)^{2s-2n-t})=0\). Since h(x) is a unit, so \((h(x) + q(x)(x-1)^{2s-2n-t})\) is also a unit. Therefore, \((x-1)^s=0\), which is a contradiction. Hence, \(i > 2n-s\). So we consider the following cases: Case (i) When \(t \ge 2s-2n\), we have \(q(x)=(x-1)^{2n-2s+t} h(x)\). Therefore, \(g(x)=(x-1)^{2n-s}+v(x-1)^{2n-2s+t} h(x)\). Again as was shown earlier,

    $$\begin{aligned} A(I)=\left\langle (x-1)^{2n-s}+v(x-1)^{2n-2s+t} h(x) \right\rangle . \end{aligned}$$

    Case (ii) When \(t < 2s-2n\), we have \(i > 2n-s\). From (2) we get \(i \ge s-t\), for otherwise, we get a contradiction. So we must have \(i = s-t\), and hence, \(q(x)=h(x)\). Therefore,

    $$\begin{aligned} A(I)=\left\langle (x-1)^{s-t}+vh(x),~v(x-1)^{2n-s} \right\rangle . \end{aligned}$$

(c) Can be proved similarly. \(\square \)

The following result gives a complete list of \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) that are contained in their annihilators.

Theorem 8

Let \(\textit{C}\) be a \((1+\lambda u)\)-constacyclic code of length n over \(\mathrm {R}\) such that \(\textit{C}\subseteq A(\textit{C})\). Then \(\textit{C}\) is one of the following:

  1. (a)

    \(\textit{C}=\langle v(x-1)^{m}\rangle \), where \(0 \le m \le 2n\).

  2. (b)

    \(\textit{C}=\langle (x-1)^s+v (x-1)^t h(x) \rangle \), where \(n \le s \le 2n-1\), \(0 \le t \le T-1\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\).

  3. (c)

    \(\textit{C}=\langle (x-1)^s+v (x-1)^t h(x), ~v(x-1)^m \rangle \), where \(n < s \le 2n-1\), \(2n-s< m < T\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\).

Proof

In all the cases (a), (b) and (c), it is easy to see that each generator g(x) of \((1+\lambda u)\)-constacyclic code is self-orthogonal i.e. \(g(x)^2=0\ (\mathrm {mod}\ x^n-1)\). Further, if a \((1+\lambda u)\)-constacyclic code is non-principal, the two generators are orthogonal to each other only when \(s+m \ge 2n\). The results follows. \(\square \)

In the following result, we list all \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) that are equal to their annihilators.

Theorem 9

Let \(\textit{C}\) be a \((1+\lambda u)\)-constacyclic code of length n over \(\mathrm {R}\) such that \(\textit{C}=A(\textit{C})\). Then \(\textit{C}\) is one of the following:

  1. (a)

    \(\textit{C}=\langle v \rangle \).

  2. (b)

    \(\textit{C}=\langle (x-1)^{n}+v (x-1)^th(x) \rangle \), where \( t \ge 0\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\).

  3. (c)

    \(\textit{C}=\langle (x-1)^{s}+v h(x) \rangle \), where \(n < s \le 2n-1\), h(x) is unit in \(\mathrm {R}_n^{\prime }\).

  4. (d)

    \(\textit{C}=\langle (x-1)^s+v (x-1)^t h(x), ~v(x-1)^{2n-s} \rangle \), where \(n \le s \le 2n-1\), \(0 \le t < 2n-s\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\).

Proof

Part (a) is trivial. For part (b), let \(C=\langle f(x) \rangle \), where \(f(x)=(x-1)^{n}+v (x-1)^th(x)\), be a principally generated constacyclic code of length n over \(\mathrm {R}\). Since \((f(x))^2=\left( (x-1)^{n}+v (x-1)^th(x) \right) ^2=0\ (\mathrm {mod}\ x^n-1)\), we have \(C\subseteq A(\textit{C})\). Also from Theorem 6, we have \(|\textit{C}|=2^{2n}\). Further, we know that \(|\textit{C}||A(\textit{C})|=|\textit{C}||A^*(\textit{C})|=|\textit{C}||\textit{C}^\perp |=2^{4n}\), which implies that \(|A(\textit{C})|=\frac{2^{4n}}{2^{2n}}=2^{2n}=|\textit{C}|\). Hence, \(\textit{C}=A(\textit{C})\). Part (c) can be proved similarly. For part (d), let \(\textit{C}=\left\langle f(x), ~v(x-1)^m \right\rangle \), where \(f(x)=(x-1)^{s}+v (x-1)^th(x)\), \(n \le s \le 2n-1\), \(1 \le m \le T-1\), be a non-principal constacyclic code of length n over \(\mathrm {R}\), where T is defined in (6). Clearly \((f(x))^2=\left( (x-1)^{s}+v (x-1)^th(x) \right) ^2=0\ (\mathrm {mod}\ x^n-1)\) and \(\left( v(x-1)^m\right) ^2=0\ (\mathrm {mod}\ x^n-1)\). Since \(2n=m+s\) and \(x-1\) is nilpotent element of index 2n, \(\left( (x-1)^{s}+v (x-1)^th(x)\right) v(x-1)^m=v(x-1)^{m+s}=0\ (\mathrm {mod}\ x^n-1)\), which implies that \(\textit{C}\subseteq A(\textit{C})\). Also since \(|\textit{C}|=2^{2n}\), we get \(|A(\textit{C})|=|\textit{C}^\perp |=\frac{2^{4n}}{2^{2n}}=2^{2n}=|\textit{C}|\). Therefore, \(\textit{C}=A(\textit{C})\). \(\square \)

5 Enumeration of \((1+\lambda u)\)-Constacyclic Codes of Length n Over \(\mathrm {R}\)

In this section, we enumerate the number of \((1+\lambda u)\)-constacyclic codes \(\textit{C}\) such that \(\textit{C}=A(\textit{C})\), and \(\textit{C}\subseteq A(\textit{C})\).

Theorem 10

There exist \({2^{n+1}-1}\) distinct \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) that are equal to their annihilators.

Proof

We enumerate these codes for each case separately as given in Theorem 9. Their total sum is the required number. First, we determine the number of non-principal \((1+\lambda u)\)-constacyclic codes of the type \(\textit{C}=\langle (x-1)^{s}+v (x-1)^th(x), \ v(x-1)^{2n-s}\rangle \) of length \(n=2^k\) over \(\mathrm {R}\), where \(n < s \le 2n-1\), \(0 \le t < 2n-s\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\). If \(h(x)=0\), then the number of \((1+\lambda u)\)-constacyclic codes of this type is \(n-1\). Suppose \(h(x)\ne 0\). Then we have \(\mathrm {deg}(h(x))\le 2n-s-t-1\). Also, from the definition of \(\textit{C}=\langle (x-1)^{s}+v (x-1)^th(x), \ v(x-1)^{2n-s}\rangle \) we have \(2n-s < T\) (Theorem 5). But as \(T=2n-s+t\), we get \(t \ge 1\). Again, as \(t \le 2n-s-1\), \(t \ge 1\), so \(s \le 2n-2\). Thus, the number of \((1+\lambda u)\)-constacyclic codes in this case is

$$\begin{aligned} \sum \limits _{s=n+1}^{2n-2} \sum \limits _{t=1}^{2n-s-1} 2^{2n-s-t-1}&= \sum \limits _{s=n+1}^{2n-2} \left( 2^{2n-s-1}-1 \right) \\ \quad \quad \quad&= (2^{n-1}-2)-(n-2)\\ \quad \quad \quad&= 2^{n-1}-n. \end{aligned}$$

Therefore, the total number of non-principal \((1+\lambda u)\)-constacyclic codes \(\textit{C}\) such that \(\textit{C}=A(\textit{C})\) is \( \left( 2^{n-1}-n\right) +(n-1)=2^{n-1}-1\).

Next we enumerate the number of principal \((1+\lambda u)\)-constacyclic codes of the type \(\textit{C}=\langle (x-1)^{s}+v (x-1)^th(x)\rangle \), where \(0 \le t < s-1\), \(s=n\) and h(x) is either zero or unit in \(\mathrm {R}_n^{\prime }\) as given in Theorem 9b. There is one \((1+\lambda u)\)-constacyclic codes of this type when \(h(x)=0\), namely \(\textit{C}=\langle (x-1)^{n}\rangle \). If \(h(x) \ne 0\), then from the definition of T, we have \(T=n\), and hence, \(\mathrm {deg}(h(x)) \le \)\(n-t-1\). So the number of \((1+\lambda u)\)-constacyclic codes \(\textit{C}\) such that \(\textit{C}=A(\textit{C})\) is \(\sum _{t=0}^{n-1}2^{n-t-1}=2^{n}-1\). Therefore, the total number of \((1+\lambda u)\)-constacyclic codes in this case is \(1+2^{n}-1= 2^{n}\).

Let \(\textit{C}=\langle (x-1)^{s}+v h(x)\rangle \), where \(n < s \le 2n-1\) and h(x) is a unit in \(\mathrm {R}_n^{\prime }\), be a \((1+\lambda u)\)-constacyclic code of length n over \(\mathrm {R}\) as given in Theorem 9c. Since \(h(x) \ne 0\) we have \(T=2n-s\). Therefore, \(\mathrm {deg}(h(x)) \le \)\(2n-s-1\). So the number of \((1+\lambda u)\)-constacyclic codes of this type is \(\sum _{s=n+1}^{2n-1} 2^{2n-s-1}=2^{n-1}-1\).

Finally there is one \((1+\lambda u)\)-constacyclic code \(\langle v\rangle \) such that \(\textit{C}=A(\textit{C})\). Summing the number of codes in all cases, the total number of \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) that are equal to their annihilators is \(2^{n+1}-1\). \(\square \)

Theorem 11

There exist \( 2^{n+2}+2^{n+1}+n^2-5n-5\) distinct \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) that are contained in their annihilators.

Proof

We find the mass formula by enumerating the number of \((1+\lambda u)\)-constacyclic codes of length \(n=2^k\) in each case separately, as given in Theorem 8. First, we consider the number of non-principal \((1+\lambda u)\)-constacyclic codes \(\textit{C}=\langle (x+1)^s+v (x+1)^t h(x), \ v(x+1)^m \rangle \) of length n over \(\mathrm {R}\), where \(n < s \le 2n-1\), \(2n-s< m < T\) and h(x) is either zero or a unit in \(\mathrm {R}_n^{\prime }\) with \(\mathrm {deg}(h(x)) \le m-t-1\). If \(h(x)=0\), then \(\textit{C}=\langle (x+1)^s, \ v(x+1)^m\rangle \), where \(n < s \le 2n-1\), \(2n-s< m < T\) and \(T=s\). So the number of \((1+\lambda u)\)-constacyclic codes of this type is \(\sum _{s=n+1}^{2n-1} 2n = 2n(n-2)\). If \(h(x) \ne 0\), then \(0 \le \mathrm {deg}(h(x)) \le m-t-1\) and \(T=2n-s+t\). Since \(2n-s< m < T\) and \(T=2n-s+t\), we have \(t \ge 1\). Also, as \(t \le 2n-s-1\) and \(t\ge 1\), so \(s\le 2n-2\). From (1), we have \(T=2n-s+t\) if \(0 \le t \le 2s-2n\) and \(T=s\) if \(2s-2n+1 \le t < s\). Therefore, the number of non-principal \((1+\lambda u)\)-constacyclic codes when \(h(x) \ne 0\) is given by

$$\begin{aligned}&\sum \limits _{s=n+1}^{2n-2}\left[ \sum \limits _{t=1}^{2s-2n} \sum \limits _{m=2n-s}^{2n-s+t-1} 2^{m-t-1} + \sum \limits _{t=2s-2n+1}^{2n-s-1} \sum \limits _{m=2n-s}^{s-1} 2^{m-t-1} +\sum \limits _{t=2n-s}^{s-2} \sum \limits _{m=1+t}^{s-1} 2^{m-t-1} \right] \\&\quad =2^{n+1}-4n-(n-1)(n-2). \end{aligned}$$

Therefore, the total number of non-principal \((1+\lambda u)\)-constacyclic codes given in case (c) of Theorem 8 is \(2^{n+1}+n^2-5n-2\).

Now we enumerate the number \((1+\lambda u)\)-constacyclic codes of the type \(C=\langle (x+1)^s+v(x+1)^th(x) \rangle \), \(n \le s \le 2n-1\), \(0 \le t \le s-1\) and h(x) is either zero or unit in \(\mathrm {R}_n^{\prime }\). If \(h(x)=0\), then the number of such codes is n. If \(h(x) \ne 0\), then \(\mathrm {deg}(h(x)) \le T-t-1\). Also from the definition of T, we have \(T=2n-s+t\) if \(0 \le t \le 2s-2n\) and \(T=s \) if \(2s-2n+1 \le t \le s-1\). Therefore, the number of principal \((1+\lambda u)\)-constacyclic codes of this type is

$$\begin{aligned} \sum \limits _{s=n}^{2n-1} \left[ \sum \limits _{t=0}^{2s-2n} 2^{2n-s+t-t-1} + \sum \limits _{t=2s-2n+1}^{s-1} 2^{s-t-1} \right] = 2^{n+2}-3n-4. \end{aligned}$$

Therefore, the total number of principal \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) as given in case (b) of Theorem 8 is \(2^{n+2}-2n-4\).

Finally there is one trivial \((1+\lambda u)\)-constacyclic code \(\langle v\rangle \), which is contained in its annihilator. Further, the number of \((1+\lambda u)\)-constacyclic codes of the type \(C=\langle v(x+1)^{m}\rangle \), \(0 < m \le 2n\) is 2n.

Summing the number of ideals in each case given above, the total number of \((1+\lambda u)\)-constacyclic codes of length n over \(\mathrm {R}\) that are contained in their annihilators is \( 2^{n+2}+2^{n+1}+n^2-5n-5\). \(\square \)

Example 1

For \(n=2\), \(\mathrm {R}_2=\frac{\mathrm {R}[x]}{\langle x^2-(1+\lambda u) \rangle }\) has 22 ideals (\((1+\lambda u)\)-constacyclic codes of length 2 over \(\mathrm {R}\)), out of which 7 are equal to their annihilators (marked by \({}^*\)) and 13 are contained in their annihilators (marked by \({}^\dag \)). They are listed in the following table along with their annihilators, size, minimum Hamming and Lee distances:

\((1+\lambda u)\)-Constacyclic code C

Annihilator A(C)

Size of C

\(d_\mathrm{H}(C)\)

\(d_\mathrm{L}(C)\)

\(C_1=\langle 0 \rangle \)

\(C_2\)

1

0

0

\(C_2=\langle 1 \rangle \)

\(C_1\)

256

1

1

\(C_3=\langle v \rangle \)

\(C_3^{*\dag }\)

16

1

1

\(C_4=\langle v(x+1) \rangle \)

\(C_{20}\)

8

1

2

\(C_5=\langle v(x+1)^2 \rangle \)

\(C_{17}^{\dag }\)

4

1

2

\(C_6=\langle v(x+1)^3 \rangle \)

\(C_{16}^{\dag }\)

2

2

4

\(C_7=\langle (x+1) \rangle \)

\(C_{9}\)

64

1

2

\(C_8=\langle (x+1)^2 \rangle \)

\(C_{8}^{*\dag }\)

16

1

2

\(C_9=\langle (x+1)^3 \rangle \)

\(C_{7}^{\dag }\)

4

2

4

\(C_{10} =\langle (x+1)+v \rangle \)

\(C_{6}\)

64

1

2

\(C_{11}=\langle (x+1)^2+v \rangle \)

\(C_{11}^{*\dag }\)

16

1

2

\(C_{12}=\langle (x+1)^2+v(x+1) \rangle \)

\(C_{12}^{*\dag }\)

16

1

2

\(C_{13}=\langle (x+1)^2+v(1+(x+1)) \rangle \)

\(C_{13}^{*\dag }\)

16

1

2

\(C_{14}=\langle (x+1)^3+v \rangle \)

\(C_{14}^{*\dag }\)

16

1

2

\(C_{15}=\langle (x+1)^3+v(x+1) \rangle \)

\(C_{19}^{\dag }\)

8

1

2

\(C_{16}=\langle (x+1), ~v \rangle \)

\(C_{6}\)

128

1

1

\(C_{17}=\langle (x+1)^2, ~v \rangle \)

\(C_{5}\)

64

1

1

\(C_{18}=\langle (x+1)^2,~v(x+1) \rangle \)

\(C_{22}\)

32

1

2

\(C_{19}=\langle (x+1)^2+v, ~v(x+1) \rangle \)

\(C_{15}\)

32

1

2

\(C_{20}=\langle (x+1)^3, ~v \rangle \)

\(C_{4}\)

32

1

1

\(C_{21}=\langle (x+1)^3,~v(x+1) \rangle \)

\(C_{21}^{*\dag }\)

16

1

2

\(C_{22}=\langle (x+1)^3,~v(x+1)^2 \rangle \)

\(C_{18}^{\dag }\)

8

1

2

Remark 1

The binary image of the ideal \(\textit{C}_{10}=\langle (x+1)+v\rangle \) is an [8, 6, 2] optimal code according to [15].

Example 2

In \(R_{4}\), the ideal generated by \((x+1)+v\) is a good code of length 4 over \(\mathrm {R}\) as its Gray image under \(\phi \) is an optimal [16, 12, 2]-binary code [15].

6 Structure of 1-Generator Quasi-cyclic Codes Over \(\mathrm {R}\)

A linear code \(\textit{C}\) of length n over \(\mathrm {R}\) is called a quasi-cyclic (QC) code if \(\sigma ^\ell (c)\in \textit{C}\) whenever \(c\in \textit{C}\) for some positive integer \(\ell \), where \(\sigma \) is the usual cyclic shift operator. The smallest such \(\ell \) is called the index of \(\textit{C}\) and in this case \(n=m\ell \) for some positive integer m. A QC code of index \(\ell \) is also called an \(\ell \)-QC code. Under polynomial notations, \(\textit{C}\) is an \(\ell \)-QC code of length \(n=m\ell \) over \(\mathrm {R}\) if and only if \(\textit{C}\) is an \(\mathrm {R}_m\)-submodule of \(\left( \mathrm {R}_m \right) ^\ell \), where \(\mathrm {R}_m=\mathrm {R}[x]/\langle x^{m}-1\rangle \). Note that for \(\ell =1\), an \(\ell \)-QC code over \(\mathrm {R}\) is a cyclic code of length m over \(\mathrm {R}\). An r-generator QC code is a \(\mathrm {R}_m\)-submodule of \(\left( \mathrm {R}_m\right) ^\ell \) with r-generators. In this section, we study 1-generator QC codes of length \(n=m\ell \) over the ring \(\mathrm {R}\). A 1-generator QC code \(\textit{C}\) over \(\mathrm {R}\) generated by \({\mathscr {F}}(x)=\left( F_1(x),F_2(x),\ldots , F_{\ell }(x) \right) \), where \(F_i(x)\in \mathrm {R}_m\), \(1\le i \le \ell \) is defined as \(\textit{C}=\{f(x){\mathscr {F}}(x) \mid f(x)\in \mathrm {R}[x]\}\), where \(f(x)F_i(x)\) is determined in \(\mathrm {R}_m\). The following result gives the form of \(F_i(x)\) of a 1-generator QC of length \(n=m\ell \) over \(\mathrm {R}\) generated by \({\mathscr {F}}(x)\) for odd m.

Theorem 12

Let \(\textit{C}\) be a 1-generator \(\ell \)-QC code of length \(n=m\ell \) over \(\mathrm {R}\) generated by \({\mathscr {F}}(x)=(F_1(x), F_2(x), \ldots ,F_\ell (x))\in \left( \mathrm {R}_m\right) ^\ell \). Then for each i, \(1\le i \le \ell \), we have \(F_i(x)\) belongs to a cyclic code \(\textit{C}_i\) of length m over \(\mathrm {R}\), and if m is odd, then \(F_i(x)\) is of the form \(F_i(x)=f_{1,i}(x)(g_1(x)+ua_1(x))+f_{2,i}(x)(a_2(x)+ua_3(x))\), for some \(f_{1,i}(x)\) and \(f_{2,i}(x)\in \mathrm {R}_m\) and \(g_1,a_1,a_2,a_3\) are as defined in Theorem 1.

Proof

For each \(1\le i\le l\), consider the following projection mapping

$$\begin{aligned} \varPi _i:\left( \mathrm {R}_m[x]\right) ^l \rightarrow \mathrm {R}_m[x], \end{aligned}$$

such that \(\varPi _i(F_1(x),F_2(x),\ldots ,F_l(x))=F_i(x)\). If \(\textit{C}=\langle (F_1(x),F_2(x),\ldots ,F_\ell (x))\rangle \) is an \(\ell \)- QC code of length \(n=m\ell \), then it is easy to show that \(\varPi _i(\textit{C})\) is a cyclic code of length m over \(\mathrm {R}\). The result then follows from Theorem 1. \(\square \)

The general form of the generator of a 1-generator QC code of odd length n over \(\mathrm {R}\) is \({\mathscr {F}}=(f_1g_1+up_1+vq_1+uvr_1, f_2g_2+up_2+vq_2+uvr_2,\ldots ,f_\ell g_{\ell }+up_{\ell }+vq_\ell +uvr_{\ell })\). In this paper, we study 1-generator QC codes with generator of the form \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell )\). The following result gives a minimal spanning set and cardinality of such codes.

Theorem 13

Let m be an odd integer and \(\textit{C}\) be a 1-generator \(\ell \)-QC code of length \(n=m\ell \) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell )\), where \(f_i,g_i,q_i,r_i\in {\mathbb {F}}_2[x]\) and \(g_i|(x^m-1)\) for all \(1\le i\le \ell \). Let

$$\begin{aligned} g&=\mathrm {gcd}\{f_1g_1,f_2g_2,\ldots ,f_\ell g_\ell ,x^m-1\}, \ \mathrm {where}\ gh =x^m-1\ \mathrm {with}\ \mathrm {deg}(h)=t_1, \\ \varpi&=\mathrm {gcd}\{q_1h,q_2h,\ldots ,q_\ell h,x^m-1\}, \ \mathrm {where}\ \varpi \nu =x^m-1 \ \mathrm {with}\ \mathrm {deg}(\nu )=t_2,\ \mathrm {and} \\ \rho&=\mathrm {gcd}\{r_1h\nu ,r_2h\nu ,\ldots ,r_\ell h\nu ,x^m-1\}, \ \mathrm {where}\ \rho \lambda =x^m-1 \ \mathrm {with}\ \mathrm {deg}(\lambda )=t_3. \end{aligned}$$

If there exist \(i_0,\ 1\le i_0\le \ell \) such that \((f_{i_0}g_{i_0}+vq_{i_0}+uvr_{i_0})\not \mid x^m-1\), then \(\textit{C}\) has a minimal spanned set \(S=S_1\cup S_2 \cup S_3\), where \(S_1 = \{{\mathscr {F}},x{\mathscr {F}},\ldots ,x^{t_1-1}{\mathscr {F}}\}\), \(S_2 = \{{\mathscr {F}}_1,x{\mathscr {F}}_1,\ldots ,x^{t_2-1}{\mathscr {F}}_1\}\), \(S_3 = \{{\mathscr {F}}_2,x{\mathscr {F}}_2,\ldots ,x^{t_3-1}{\mathscr {F}}_2\}\), where \({\mathscr {F}}_1=(vq_1h+uvr_1h, vq_2h+uvr_2h,\cdots ,vq_\ell h+uvr_\ell h)\) and \({\mathscr {F}}_2=(uvr_1h\nu , uvr_2h\nu ,\ldots ,uvr_\ell h\nu )\). Further, \(|\textit{C}|=16^{t_1} 4^{t_2}2^{t_3}\).

Proof

Let \(c(x)\in \textit{C}\). Then \(c(x)=f(x){\mathscr {F}}\) for some \(f(x)\in \mathrm {R}[x]\). By division algorithm, we get \(Q_1,R_1\in \mathrm {R}[x]\) such that

$$\begin{aligned} f(x)=Q_1h+R_1,\ \mathrm {where}\ R_1=0\ \mathrm {or}\ \mathrm {deg}(R_1)<t_1. \end{aligned}$$

From the definition of h, we have \((f_ig_i+vq_i+uvr_i)h=(vq_i+uvr_i)h\) for each \(1\le i\le \ell \). Therefore,

$$\begin{aligned} c(x)&=f(x){\mathscr {F}}\nonumber \\&=(Q_1h+R_1){\mathscr {F}}\nonumber \\&=Q_1{\mathscr {F}}_1+R_1{\mathscr {F}}. \end{aligned}$$
(4)

As deg\((R_1)<t_1\), we have \(R_1{\mathscr {F}}\in span(S_1)\). Again using the division algorithm we get \(Q_2,R_2\in \mathrm {R}[x]\) such that \(Q_1(x)=Q_2\nu +R_2,\ \mathrm {where}\ R_2=0\ \mathrm {or}\ \mathrm {deg}(R_2)<t_2\). Also from the definition of \(\nu \), we have \((vq_ih+uvr_ih)\nu =uvr_ih\nu \) for each \(1\le i\le \ell \). Therefore, from (4), we get

$$\begin{aligned} c(x)&=Q_1{\mathscr {F}}_1+R_1{\mathscr {F}}\nonumber \\&=(Q_2\nu +R_2){\mathscr {F}}_1+R_1{\mathscr {F}}\nonumber \\&=Q_2{\mathscr {F}}_2+R_2 {\mathscr {F}}_1+R_1{\mathscr {F}}. \end{aligned}$$
(5)

As deg\((R_2)<t_2\), so \(R_2 {\mathscr {F}}_1\in \)span\((S_2)\). Again by division algorithm, we get \(Q_3,R_3\in \mathrm {R}[x]\) such that \(Q_2(x)=Q_3\lambda +R_3,\ \mathrm {where}\ R_3=0\ \mathrm {or}\ \mathrm {deg}(R_3)<t_3\). Therefore, from (5), we get

$$\begin{aligned} c(x)&=Q_2{\mathscr {F}}_2+R_2 {\mathscr {F}}_1+R_1{\mathscr {F}}\nonumber \\&=(Q_3\lambda +R_3){\mathscr {F}}_2+R_2 {\mathscr {F}}_1+R_1{\mathscr {F}}\nonumber \\&=R_3{\mathscr {F}}_2+R_2 {\mathscr {F}}_1+R_1{\mathscr {F}}. \end{aligned}$$
(6)

It is easy to see that \(R_3{\mathscr {F}}_2 \in \mathrm {span}(S_3)\) and therefore \(c(x)=R_3{\mathscr {F}}_2+R_2 {\mathscr {F}}_1+R_1{\mathscr {F}} \in span (S_1\cup S_2\cup S_3)\). Hence, \(S_1\cup S_2 \cup S_3\) spans \(\textit{C}\). Now to prove \(S_1\cup S_2 \cup S_3\) is a minimal spanning set of \(\textit{C}\), we show \(span(S_i)\cap span(S_j)=\{0\}\) for \(i\ne j\). Let \(e(x)=(e_1(x),e_2(x),\ldots ,e_{\ell }(x))\in span(S_1)\cap span(S_2)\). Since \(e(x)\in span(S_1)\), we have \(e_i(x)=(g_i+vq_i+uvr_i)M_1^{(i)}\), where \(M_1^{(i)}=\alpha _0+\alpha _1x+\cdots +\alpha _{t_1-1}x^{t_1-1}\in \mathrm {R}[x]\). Again as \(e(x)\in span(S_2)\), we get \(e_i(x)=v(q_i+ur_i)hM_2^{(i)}\), where \(M_2^{(i)}=\beta _0+\beta _1x+\cdots +\beta _{t_2-1}x^{t_2-1} \in \mathrm {R}^\prime [x]\) for all \(1\le i \le \ell \). Therefore, we get \(0=ve_i(x)=v(g_i+vq_i+uvr_i)M_1^{(i)}=v(g_i)M_1^{(i)}\). Then \(v\alpha _i=0,\ \forall i\), which implies that each \(\alpha _i\) is either 0 or v or uv. Also from \(e_i(x)=(g_i+vq_i+uvr_i)M_1^{(i)}=v( q_i+ur_i)hM_2^{(i)}\), we get \((g_i+vq_i+uvr_i)(M_1^{(i)}+hM_2^{(i)})=0\). Since \((g_i+vq_i+uvr_i)\not \mid (x^{m}-1)\) for \(i=i_0\), we get \(M_1^{(i)}+hM_2^{(i)}=0\), which is possible only when both \(M_1^{(i)}\) and \(M_2^{(i)}\) are zero. Therefore, \(span(S_1)\cap span(S_2)=\{0\}\). Similarly, we can prove \(span(S_1)\cap span(S_3)=\{0\}\) and \(span(S_2)\cap span(S_3)=\{0\}\). Hence, the result follows. \(\square \)

Example 3

Let \(m=5\) and \(x^5-1=(x-1)(x^4+x^3 + x^2 + 1)=f_1^\prime f_2^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=10\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=1\), \(g_1=g_2=f_2^\prime \), \(q_1=x^4+1\), \(q_2=x^3+x\), \(r_1=x^3 + x^2+ x\) and \(r_2=x^4 + x^2+ x+1\). From Theorem 13, we have \(h=f_1^\prime \), \(\nu =f_2^\prime \) and \(\lambda =0\). Therefore, \(\textit{C}\) is spanned by the set \(S=\{(f_2^\prime +v (x^4+1)+uv (x^3 + x^2+ x) ,\ f_2^\prime +v (x^3+x)+uv (x^4 + x^2+ x+1)),\ (v (x^4+1)f_1^\prime +uv (x^3 + x^2+ x)f_1^\prime ,\ v (x^3+x)f_1^\prime +uv (x^4 + x^2+ x+1)f_1^\prime ),\ x(v (x^4+1)f_1^\prime +uv (x^3 + x^2+ x)f_1^\prime ,\ v (x^3+x)f_1^\prime +uv (x^4 + x^2+ x+1)f_1^\prime ),\ x^2(v (x^4+1)f_1^\prime +uv (x^3 + x^2+ x)f_1^\prime ,\ v (x^3+x)f_1^\prime +uv (x^4 + x^2+ x+1)f_1^\prime ),\ x^3(v (x^4+1)f_1^\prime +uv (x^3 + x^2+ x)f_1^\prime ,\ v (x^3+x)f_1^\prime +uv (x^4 + x^2+ x+1)f_1^\prime )\}\) and \(|\textit{C}|=16^1\cdot 4^4=2^{12}\). Further, the Gray image of \(\textit{C}\) under \(\phi \) is a binary [40, 12, 12]-linear code with Hamming weight enumerator \(x^{40} + 130x^{28}y^{12} + 735x^{24}y^{16} + 2364x^{20}y^{20} + 735x^{16}y^{24} +130x^{12}y^{28}+ y^{40}\). As the Gray map defined is linear isometry, the weight enumerator polynomial of \(\textit{C}\) is the same as that of \(\phi (\textit{C})\).

Example 4

Let \(m=7\) and \(x^7-1=(x-1)(x^3+x+1)(x^3+x^2+1)=f_1^\prime f_2^\prime f_3^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=14\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=1\), \(g_1=g_2=f_2^\prime f_3^\prime \), \(q_1=f_2^\prime \), \(q_2=xf_2^\prime \), \(r_1=1\) and \(r_2=x^2\). From Theorem 13, we get \(h=x+1\), \(\nu =x^3+x^2+1\) and \(\lambda =x^3+x+1\) and so \(t_1=1\), \(t_2=3\) and \(t_3=3\). Therefore, \(|\textit{C}|=16^1\cdot 4^3\cdot 2^3=2^{13}\). The Gray image \(\phi (\textit{C})\) is a binary [56, 13, 12] -linear code. The Hamming weight enumerator of \(\phi (\textit{C})\) is \(x^{56} + 14 x^{44} y^{12} + 4 x^{42} y^{14} + 42 x^{40} y^{16} + 28 x^{38} y^{18} + 168 x^{36} y^{20} + 532 x^{34} y^{22} + 469 x^{32} y^{24} + 1484 x^{30} y^{26} + 2708 x^{28} y^{28} + 1484 x^{26} y^{30} + 469 x^{24} y^{32} + 532 x^{22} y^{34} + 168 x^{20} y^{36} + 28 x^{18} y^{38} + 42 x^{16} y^{40} + 4 x^{14} y^{42} + 14 x^{12} y^{44} + y^{56}\).

Example 5

Let \(m=3\) and \(x^3-1=(x-1)(x^2+x+1)=f_1^\prime f_2^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=6\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=x\), \(f_2=1\), \(g_1=g_2=f_1^\prime \), \(q_1=0\), \(q_2=x\), \(r_1=1\) and \(r_2=x\). As above, we have \(h=x^2+x+1\), \(\nu =x+1\) and \(\lambda =0\). Therefore, \(t_1=2\), \(t_2=1\) and \(t_3=0\) and \(|\textit{C}|=16^2\cdot 4^1=2^{10}\). Under the Gray map \(\phi \), \(\phi (\textit{C})\) is a [24, 10, 6]-linear code over \({\mathbb {F}}_2\). The Hamming weight enumerator of \(\phi (\textit{C})\) is \(x^{24} + 12 x^{18} y^6 + 90 x^{16} y^8 + 252 x^{14} y^{10} + 328 x^{12} y^{12} + 228 x^{10} y^{14} + 93 x^8 y^{16} + 20 x^6 y^{18}\).

Example 6

Let \(m=5\) and \(x^5-1=(x-1)(x^4+x^3+x^2+x+1)=f_1^\prime f_2^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=10\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=x+1\), \(g_1=g_2=x+1\), \(q_1=q_2=1\) and \(r_1=r_2=1\). Again as above, we have \(h=x^4+x^3+x^2+x+1\), \(\nu =x+1\) and \(\lambda =0\). Therefore, \(t_1=4\), \(t_2=1\) and \(t_3=0\) and \(|\textit{C}|=16^4\cdot 4^1=2^{18}\). \(\phi (\textit{C})\) is a [40, 18, 4]- linear code over \({\mathbb {F}}_2\). The Hamming weight enumerator of \(\phi (\textit{C})\) is \(x^{40} + 90 x^{36} y^4 + 2445 x^{32} y^8 + 19320 x^{28} y^{12} + 63090 x^{24} y^{16} + 92252 x^{20} y^{20} + 63090 x^{16} y^{24} + 19320 x^{12} y^{28} + 2445 x^8 y^{32} + 90 x^4 y^{36} + y^{40}\).

In Theorem 13, if \(f_ig_i+vq_i+uvr_i\) divides \(x^{m}-1\) for each \(i,\ 1\le i\le \ell \), then we have the following result.

Theorem 14

Let \(\textit{C}\) be a 1-generator \(\ell \)-QC code over \(\mathrm {R}\) of length \(n=m\ell \), m odd, generated by \({\mathscr {F}}=\left( f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell \right) \), where \(f_i,g_i,q_i,r_i \in {\mathbb {F}}_2[x]\), \(g_i|(x^m-1)\) and \((f_{i}g_{i}+vq_{i}+uvr_{i})| x^m-1\) for all \(1\le i\le \ell \). If \(g+vq+uvr=\mathrm {gcd}\{f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots , f_\ell g_\ell +vq_\ell +uvr_\ell ,x^m-1\}\) over \(\mathrm {R}\) with \(\mathrm {deg}(g+vq+uvr)=t\), then \(\textit{C}\) is a free QC code with a minimal spanning set \(S_1 = \{{\mathscr {F}},x{\mathscr {F}},\ldots ,x^{m-t-1}{\mathscr {F}}\}\) and \(|\textit{C}|=16^{m-t}\).

Proof

Let \((g+vq+uvr)(h+vq^\prime +uvr^\prime )=x^m-1\). Then \((f_ig_i+vq_i+uvr_i)(he+vq^\prime +uvr^\prime )=0\) in \(\mathrm {R}_m\) for each \(1\le i \le \ell \). We also note that \(\mu (g+vq+uvr)\mu (h+vq^\prime +uvr^\prime )=gh=0\) in \({\mathbb {F}}_2[x]/\langle x^m-1\rangle \), where \(\mu (f)=f\ \mathrm {mod}(u,v)\). Therefore, \((f_ig_i+vq_i+uvr_i)(h+vq^\prime +uvr^\prime )=(vq_ih+uvr_ih)+(f_ig_i+vq_i+uvr_i)(vq^\prime +uvr^\prime )=0\), and hence,

$$\begin{aligned} (vq_ih+uvr_ih)=(f_ig_i+vq_i+uvr_i)(vq^\prime +uvr^\prime )\ \mathrm {for\ each\ }\ 1\le i \le \ell \end{aligned}$$
(7)

In view of Theorem 13, to show that \(S_1\) spans \(\textit{C}\), we show \(span(S_2)\subseteq span(S_1)\), where \(S_2\) is as given in Theorem 13. Let \(c(x)\in \textit{C}\). Then \(c(x)=f(x){\mathscr {F}}\) for some \(f(x)\in \mathrm {R}[x]\). By division algorithm, we get \(q_1,r_1\in \mathrm {R}[x]\) such that \(f(x)=q_1h+r_1,\ \mathrm {where}\ r_1=0\ \mathrm {or}\ \mathrm {deg}(r_1)<m-t\). Then

$$\begin{aligned} c(x)&=f(x)(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell ) \\&=(q_1h+r_1)(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell )\\&=q_1(vq_1h+uvr_1h, vq_2h+uvr_2h,\cdots ,vq_\ell h+uvr_\ell h)+r_1(f_1g_1+vq_1+uvr_1, \\&\ \ \ \ f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell ) \\&=q_1(vq^\prime +uvr^\prime )(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell )\\&\ \ \ \ +r_1(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell ) \in span(S_1). \end{aligned}$$

Therefore, \(S_1\) spans \(\textit{C}\). Now we prove that \(S_1\) is linearly independent. Suppose that there exists a polynomial \(e\in \mathrm {R}_m\) with \(\mathrm {deg}(e)<m-t\) such that \(e{\mathscr {F}}=0\). Then \(e(f_ig_i+vq_i+uvr_i)=0\) for all \(1\le i\le \ell \). This implies that \(f_ig_i\mu (e)=0\) in \({\mathbb {F}}_2[x]/\langle x^m-1\rangle \). But as \(g|f_ig_i\), we get \(g\mu (e)=0\). This implies that \(x^m-1|g\mu (e)\) and therefore \(h|\mu (e)\). This in turn gives \(\mathrm {deg}(e)=\mathrm {deg}(\mu (e))>m-t\), a contradiction. Therefore, \(e(x)=0\), and hence, \(S_1\) is linearly independent. \(\square \)

Example 7

Let \(m=7\) and \(x^7-1=(x-1)(x^3+x+1)(x^3+x^2+1)=f_1^\prime f_2^\prime f_3^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=14\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=1\), \(g_1=f_2^\prime \), \(g_2=f_2^\prime f_3^\prime \), \(q_1=q_2=0\), \(r_1=r_2=0\). Clearly \((f_1g_1+vq_1+uvr_1)|x^m-1\) and \((f_2g_2+vq_2+uvr_2)|x^m-1\). From Theorem 14, we have \(g+vq+uvr=\mathrm {gcd}\{f_2^\prime ,\ f_2^\prime f_3^\prime ,\ x^7-1\}=f_2^\prime \) and \(\mathrm {deg}(g+vq+uvr)=t=3\). Therefore, \(S=\{ (f_2^\prime ,\ f_2^\prime f_3^\prime ), x(f_2^\prime ,\ f_2^\prime f_3^\prime ),x^2(f_2^\prime ,\ f_2^\prime f_3^\prime ) \}\) is a minimal spanning set of \(\textit{C}\), and \(\textit{C}\) contains \(16^{(7-3)}=2^{16}\) codewords. Further, the Gray image of \(\textit{C}\) under \(\phi \) is a binary linear code with parameters [56, 16, 4].

Example 8

Let \(m=15\) and \(x^{15}-1=(x-1)(x^2 + x + 1)(x^4 + x + 1)(x^4 + x^3 + 1)(x^4 + x^3 + x^2 + x + 1)=f_1^\prime f_2^\prime f_3^\prime f_4^\prime f_5^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=30\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=1\), \(g_1=f_2^\prime f_3^\prime f_4^\prime \), \(g_2=f_3^\prime f_4^\prime f_5^\prime \), \(q_1=q_2=0\), \(r_1=r_2=0\). Clearly \((f_1g_1+vq_1+uvr_1)|x^m-1\) and \((f_2g_2+vq_2+uvr_2)|x^m-1\). As above, we have \(g+vq+uvr=\mathrm {gcd}\{f_2^\prime f_3^\prime f_4^\prime ,\ f_3^\prime f_4^\prime f_5^\prime ,\ x^{15}-1\}=f_3^\prime f_4^\prime \) and \(\mathrm {deg}(g+vq+uvr)=t=8\). Therefore, \(\textit{C}\) contains \(16^{(15-8)}=2^{28}\) codewords. Further, the Gray image of \(\textit{C}\) under \(\phi \) is a binary linear code with parameters [120, 28, 6].

In the following result, we give a BCH-type bound for 1-generator \(\ell \)-QC codes that are defined in Theorem 14.

Theorem 15

Let \(\textit{C}\) be a 1-generator \(\ell \)-QC code over \(\mathrm {R}\) of length \(n=m\ell \), m odd, generated by \({\mathscr {F}}=\left( f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\cdots ,f_\ell g_\ell +vq_\ell +uvr_\ell \right) \), where \(f_i,g_i,q_i,r_i \in {\mathbb {F}}_2[x]\) and \((f_ig_i+vq_i+uvr_i)|(x^m-1)\). Let \(h_i=\frac{x^m-1}{f_1g_i+vq_i+uvr_i}\), \(1\le i\le \ell \), and \(h=\mathrm {lcm}\{ h_1,h_2,\ldots ,\ h_\ell \}\). Then

  1. 1.

    \(d_\mathrm{L}(\textit{C})\ge \sum _{i\notin K}d_i\), where K is the set with maximum size in \(\{A\subseteq \{1,2,\ldots ,\ell \}\ |\ \mathrm {lcm}\{h_i\}_{i\in A}\ne h \}\) and \(d_i\) is the minimum Lee distance of \(\varPi _i(\textit{C})\).

  2. 2.

    If \(h_1=h_2=\cdots =h_{\ell }\), then \(d_\mathrm{L}(\textit{C})\ge \sum _{i=1}^{\ell }d_i\).

Proof

Let \(c(x)=(c_1(x),c_2(x),\ldots ,c_{\ell }(x))\in \textit{C}\). Then \(c(x)=f(x){\mathscr {F}}\) for some \(f(x)\in \mathrm {R}[x]\). If \(c_i(x)=0\) for each \(1\le i \le \ell \), then \(x^m-1 |f(x)(g_{i}+vq_{i}+uvr_{i}) \). This implies that \(h_i(x)|f(x)\) for each \(i=1,2,\ldots \ell \) and hence h|f(x). Therefore, \(c(x)\ne 0\) if and only if \(h_i \not \mid f(x)\) for some i, \(1\le i \le \ell \). Also, \(h_i \not \mid x^m-1\) implies that \(c_i\ne 0\), where \(c_i\) is the ith block of c(x). Therefore, \(d(\textit{C})\ge \sum _{i\notin K}d_i\) for the set K, where K is the set with maximum size in \(\{A\subseteq \{1,2,\ldots ,\ell \}\ |\ \mathrm {lcm}\{h_i\}_{i\in A}\ne h \}\). Second part of the result follows since \(K=\emptyset \) when \(h_1=h_2=\cdots =h_{\ell }\). \(\square \)

Example 9

Let \(m=7\) and \(x^7-1=(x-1)(x^3 + x + 1)(x^3 + x^2 + 1)=f_1^\prime f_2^\prime f_3^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=14\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=1\), \(g_1=g_2=f_1^\prime f_3^\prime \), \(q_1=q_2=0\), \(r_1=r_2=0\). Clearly \((f_1g_1+vq_1+uvr_1)|x^m-1\) and \((f_2g_2+vq_2+uvr_2)|x^m-1\). Further, from Theorem 15, we have \(h_1=h_2=f_2^\prime \), \(h=f_2^\prime \) and \(\mathrm {deg}\ h=3\). Therefore, \(\textit{C}\) is a free code with \(16^3\) codewords. Further, it is easy to see that \(\varPi _1(\textit{C})=\langle f_1^\prime f_3^\prime \rangle \) is a cyclic code of length 7 over \(\mathrm {R}\) with minimum Lee distance 4 and \(\varPi _2(\textit{C})=\langle f_1^\prime f_3^\prime \rangle \) is a cyclic codes of length 7 over \(\mathrm {R}\) with minimum Lee distance 4. Again from Theorem 15(2), we have \(K=\emptyset \) and therefore \(d_\mathrm{L}(\textit{C})\ge d(\varPi _1(\textit{C}))+d(\varPi _2(\textit{C}))=4+4=8\). In fact \(\textit{C}\) is a free 1-generator QC code with parameters \((14,16^3,8)\). The Gray image of \(\textit{C}\) under \(\phi \) is a binary [56, 12, 8]-linear code with Hamming weight enumerator \(x^{56} + 28x^{48}y^8 + 294x^{40}y^{16} + 1372x^{32}y^{24} + 2401x^{24}y^{32}\).

Corollary 1

Let \(\textit{C}\) be a 1-generator \(\ell \)-QC code over \(\mathrm {R}\) of length \(n=ml\), m odd, generated by \({\mathscr {F}}=\left( f_1(g_1+vq_1+uvr_1), f_2(g_2+vq_2+uvr_2),\ldots ,f_\ell (g_\ell +vq_\ell +uvr_\ell ) \right) \), where \(f_i,g_i,q_i,r_i \in {\mathbb {F}}_2[x]\), \(g_i+vq_i+uvr_i|(x^m-1)\) and \(gcd \left( f_i, \frac{x^{m}-1}{g_i+vq_i+uvr_i}\right) =1\) for all \(1\le i\le \ell \). If \(g+vq+uvr=\mathrm {gcd}\{ g_1+vq_1+uvr_1, g_2+vq_2+uvr_2,\cdots ,g_\ell +vq_\ell +uvr_\ell \}\) over \(\mathrm {R}\) with \(\mathrm {deg}(g+vq+uvr)=k\), then

  1. 1.

    \(\textit{C}\) is a free module with basis \(S=\{{\mathscr {F}},x{\mathscr {F}},\ldots ,x^{m-k-1}{\mathscr {F}}\}\) and \(\mid \textit{C}\mid =16^{m-k}\);

  2. 2.

    \(d_\mathrm{H}(\textit{C})\ge \ell \displaystyle \min _{i=1,\ldots ,l}\{a_i+1\}\), where \(a_i\) denotes the number of consecutive powers of the m-th roots of unity that are the zeroes of \(g_i(x)\).

Proof

Let \(h_i=\frac{x^m-1}{g_{i}+vq_{i}+uvr_{i}}\) and \(h=\mathrm {lcm}\left[ h_1, h_2 \ldots , h_\ell \right] \). Then \(h=\frac{x^m-1}{g+vq+uvr}\). Similarly, as in Theorem 13 and by division algorithm, one can show that S spans \(\textit{C}\). Now all we need to show is that S is linearly independent. Assume \(f(x){\mathscr {F}}=0\) for some \(0\ne f(x)\in \mathrm {R}[x]\) with \(f(x)< \mathrm {deg}(h)\). Then \(f(x)f_i(x)(g_i+vq_i+uvr_i)=0\ (\mathrm {mod}\ x^n-1)\) for all \(1\le i\le \ell \). This implies that \((x^m-1)|f(x)f_i(x)(g_i+up_i+vq_i+uvr_i)\) and therefore \(h|f(x)f_i(x)\) for all \(1\le i\le \ell \). Since \(gcd(f_i(x),\ h_i)=1\), we get \(h_i|f\) for all \(1\le i \le \ell \). This implies that h|f and hence \( \mathrm {deg}(f(x))\ge \mathrm {deg}(h)\) which is a contradiction. Therefore, S is linearly independent.

For the second part, let \(c=(c_1,c_2,\ldots ,c_l)\) be any nonzero codeword in \(\textit{C}\). Then there exist at least one \(c_j\) coordinate of c, \(\ 1\le j\le \ell \), which is different from zero. Now \(c_j\in \varPi _j(\textit{C})=\langle f(x)(g_j+vq_j+uvr_j)\rangle =\langle g_i+vq_i+uvr_i\rangle \). From Theorem 1, we have \(w_\mathrm{H}(c_j)\ge d_\mathrm{H}(\langle g_i+vq_i+uvr_i\rangle )=d_\mathrm{H}(\langle g_i\rangle )\). The result follows as \(d_\mathrm{H}(\langle g_i\rangle )=a_j+1\), where \(a_i\) denotes the number of consecutive powers of the m-th roots of unity that are the zeroes of \(g_i(x)\). \(\square \)

Example 10

Let \(m=7\) and \(x^7-1=(x-1)(x^3 + x + 1)(x^3 + x^2 + 1)=f_1^\prime f_2^\prime f_3^\prime \). Let \(\textit{C}\) be a 1-generator QC code of length \(n=14\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1(g_1+vq_1+uvr_1),\ f_2(g_2+vq_2+uvr_2))\), where \(f_1=f_2=1\), \(g_1=g_2=f_2^\prime f_3^\prime \), \(q_1=q_2=0\), \(r_1=r_2=0\). Clearly \((g_1+vq_1+uvr_1)|x^m-1\) and \((g_2+vq_2+uvr_2)|x^m-1\). Further, from Corollary 1, we have \(h_1=h_2=f_1^\prime \), and \(h=f_1^\prime \) which is of degree 1. Therefore, \(\textit{C}\) is a free code with \(16^1\) codewords. Further, it is easy to see that \(d_\mathrm{H}(\varPi _1(\textit{C}))=d_\mathrm{H}(\varPi _2(\textit{C}))=d_\mathrm{H}(\langle f_1^\prime f_2^\prime \rangle )\). Since the number of consecutive powers of 7th roots of unity that are zeros of \(f_1^\prime f_2^\prime \) is six, and therefore, we have \(d_\mathrm{H}(\textit{C})\ge 7+7=14\). In fact \(\textit{C}\) is a free 1-generator QC code with parameters \((14,16^1,14)\). The Gray image of \(\textit{C}\) under \(\phi \) is a binary [56, 4, 14]-linear code with Hamming weight enumerator \(x^{56} + 4x^{42}y^{14} + 6x^{28}y^{28} + 4x^{14}y^{42} + y^{56}\).

6.1 Gray images of \(\ell \)-QC Codes Over \(\mathrm {R}\)

Recall that the Lee weight of an element \(a+ub \in \mathrm {R}^\prime \) is defined as \(w_L(a+ub)=w_H(a,\ a+b)\), where \(a,b\in {\mathbb {F}}_2\) and \(w_H\) denotes Hamming weight. The Lee distance on \(\mathrm {R}^\prime \) is defined accordingly. Now consider a projection mapping \(\psi :\mathrm {R}\rightarrow \left( \mathrm {R}^\prime \right) ^2\) given by \(a+bu+cv+duv \mapsto (a+bu,\ (a+c)+(b+d)u)\). Clearly \(\psi \) is a linear isometry. Extending the notations to \(\mathrm {R}^n\), we have the following theorem.

Theorem 16

If \(\textit{C}\) is an \(\ell \)-QC code of length n over \(\mathrm {R}\), then \(\psi (\textit{C})\) is a \(2\ell \)-QC code of length 2n over \(\mathrm {R}^\prime \).

Proof

The proof follows from the fact that \(\psi (\sigma ^l(c))=\sigma ^{2l}(\psi (c))\) for any \(c\in \textit{C}\). \(\square \)

Example 11

Let \(\textit{C}\) be a 1-generator QC code of length \(n=6\) and index \(\ell =2\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=f_2=1\), \(g_1=g_2=x^2+x+1\), \(q_1=q_2=x^2\), \(r_1=x^2+x\) and \(r_2=x^2+x+1\). Then \(\psi (\textit{C})\) is a 4-QC code of length 12 over \(\mathrm {R}^\prime \). The Gray image of \(\textit{C}\) under \(\phi \) is an optimal (see [15]) [24, 8, 8]-binary linear code with Hamming weight enumerator \(x^{24} + 39x^{16}y^8 + 176x^{12}y^{12} + 39x^8y^{16} + y^{24}\).

7 1-Generator Generalized Quasi-cyclic Codes

Let \(m_1,m_2,\ldots ,m_l\) be positive integers and \(\mathrm {R}_i=\mathrm {R}[x]/\langle x^{m_i}-1\rangle ,\ 1\le i \le \ell \). Then any \(\mathrm {R}[x]\)-submodule of the Cartesian product \({\mathscr {R}}=\mathrm {R}_1 \times \mathrm {R}_2 \times \cdots \times \mathrm {R}_{\ell }\) is called a generalized quasi-cyclic (GQC) code of block lengths \((m_1,m_2,\ldots ,m_{\ell })\) and length \(m_1+m_2+\cdots +m_\ell \) over the ring \(\mathrm {R}\). We note that for \(m_1=m_2=\cdots =m_{\ell }=m\), a GQC code of block length \((m_1,m_2,\ldots ,m_{\ell })\) is a quasi-cyclic code of length \(n=m\ell \) and index \(\ell \) over \(\mathrm {R}\). An r-generator GQC code over \(\mathrm {R}\) is an \(\mathrm {R}[x]\)-submodule of \({\mathscr {R}}\) with r generators. In this section, we study 1-generator GQC codes of length \((m_1,m_2,\ldots ,m_{\ell })\), \(m_i\) odd, over the ring \(\mathrm {R}\). A 1-generator GQC code \(\textit{C}\) over \(\mathrm {R}\) generated by \({\mathscr {F}}(x)=\left( F_1(x),F_2(x),\ldots , F_{\ell }(x) \right) \), where \(F_i(x)\in \mathrm {R}_i\), \(1\le i \le \ell \), is defined as \(\textit{C}=\{f(x){\mathscr {F}}(x) \mid f(x)\in \mathrm {R}[x]\}\), where \(f(x)F_i(x)\) is determined in \(\mathrm {R}_i\). The following result gives a minimal spanning set for a 1-generator GQC, block lengths \((m_1,m_2,\ldots ,m_{\ell })\) over \(\mathrm {R}\) when each \(m_i\) is odd.

Theorem 17

Let \(\textit{C}\) be a 1-generator GQC code of length \((m_1,m_2,\ldots ,m_{\ell })\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\ldots ,f_\ell g_{\ell }+vq_{\ell }+uvr_{\ell })\), where \(f_i,g_i,q_i,r_i\in {\mathbb {F}}_2[x]\), \(m_i\) is odd and \(g_i|(x^{m_i}-1)\) for all \(1\le i\le \ell \). Let \((f_ig_i+vq_i+uvr_i)\not \mid x^{m_i}-1\) for some \(i,\ 1\le i \le \ell \). Let \(h_i=\frac{x^{m_i}-1}{(f_ig_i,x^{m_i}-1)}\), \(h=\mathrm {lcm}(h_1,h_2,\ldots ,h_{\ell })\) with \(\mathrm {deg}(h)=t_1\), \(\kappa _i=\frac{x^{m_i}-1}{\mathrm {gcd}(q_ih,x^{m_i}-1)}\), \(\kappa =\mathrm {lcm}(\kappa _1,\kappa _2,\ldots ,\kappa _{\ell })\) with \(\mathrm {deg}(\kappa )=t_2\), and \(\nu _i=\frac{x^{m_i}-1}{\mathrm {gcd}(r_ih\kappa ,x^{m_i}-1)}\), \(\nu =\mathrm {lcm}(\nu _1,\nu _2,\ldots ,\nu _{\ell })\) with \(\mathrm {deg}(\nu )=t_3\). Then \(S=S_1\cup S_2 \cup S_3 \) is a minimal spanning set for \(\textit{C}\), where

$$\begin{aligned} S_1= & {} \{{\mathscr {F}},x{\mathscr {F}},\ldots ,x^{t_1-1}{\mathscr {F}}\},\\ S_2= & {} \{{\mathscr {F}}_1,x{\mathscr {F}}_1,\ldots ,x^{t_2-1}{\mathscr {F}}_1\}\ \mathrm {and}\ S_3 = \{{\mathscr {F}}_2,x{\mathscr {F}}_2,\ldots ,x^{t_3-1}{\mathscr {F}}_2\}, \end{aligned}$$

where \({\mathscr {F}}_1=(vq_1h+uvr_1h, vq_2h+uvr_2h,\ldots ,vq_{\ell }h+uvr_{\ell }h)\) and \({\mathscr {F}}_2=(uvr_1h\kappa , uvr_2h\kappa ,\ldots ,uvr_\ell h\kappa )\). Further, the cardinality of \(\textit{C}\) is \(16^{t_1}4^{t_2}2^{t_3}\).

Proof

The proof follows from the similar arguments as in Theorem 13. \(\square \)

Theorem 18

Let \(\textit{C}\) be a 1-generator GQC code of length \((m_1,m_2,\ldots ,m_{\ell })\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1, f_2g_2+vq_2+uvr_2,\ldots ,f_\ell g_{\ell }+vq_{\ell }+uvr_{\ell })\), where \(f_i,g_i,q_i,r_i\in {\mathbb {F}}_2[x]\), \(m_i\) is odd and \(g_i|(x^{m_i}-1)\). Let \((f_ig_i+vq_i+uvr_i)\mid x^{m_j}-1\) for all \(i,\ 1\le i \le \ell \), \(h_i=\frac{x^{m_i}-1}{f_ig_i+vq_i+uvr_i}\) and \(h=\mathrm {lcm}(h_1,h_2,\ldots ,h_{\ell })\) with \(\mathrm {deg}(h)=t\). Then

  1. 1.

    \(\textit{C}\) is a free \(\mathrm {R}[x]\)-module with a minimal spanning set \(S = \{{\mathscr {F}},x{\mathscr {F}},\ldots ,x^{t}{\mathscr {F}}\}\) and \(|\textit{C}|=16^{t}\).

  2. 2.

    \(d(\textit{C})\ge \sum _{i\notin K}d_i\), where \(k=max\{A\subseteq \{1,2,\ldots ,l\}\ |\ \mathrm {lcm}\{h_i\}_{i\in A}\ne h \}\) and \(d_i\) is minimum distance of \(\varPi _i(\textit{C})\).

  3. 3.

    If \(h_1=h_2=\cdots =h_l\), then \(d(\textit{C})\ge \sum _{i=1}^{l}d_i\).

Proof

The proof follows from the similar arguments as in Theorems 14 and 15. \(\square \)

Example 12

Let \(\textit{C}\) be a 1-generator GQC code of block length (5, 3) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+vq_1+uvr_1,\ f_2g_2+vq_2+uvr_2)\), where \(f_1=1\), \(f_2=x\), \(g_1=x^4+x^3+x^2+x+1\), \(g_2=x+1\), \(q_1=q_2=0\), \(r_1=r_2=0\). Further, from Theorem 17, we have \(h_1=x+1\), \(h_2=x^2+x+1\), and \(h=(x+1)(x^2+x+1)\) which is of degree 3. Also we have \(\kappa =\nu =0\). Therefore, \(\textit{C}\) is 1-generator free GQC code with parameters \((8,16^3,2)\). \(\textit{C}\) has a minimal spanning set \(S=\{ (x^4+x^3+x^2+x+1,\ x^2+x),\ x(x^4+x^3+x^2+x+1,\ x^2+x),\ x^2x(x^4+x^3+x^2+x+1,\ x^2+x) \}\) and \(|\textit{C}|=16^3\). The Gray image of \(\textit{C}\) under \(\phi \) is a binary [32, 12, 2]-linear code with Hamming weight enumerator \(x^{32} + 12 x^{30} y^2 + 54 x^{28} y^4 + 4 x^{27} y^5 + 108 x^{26} y^6 + 48 x^{25} y^7 + 81 x^{24} y^8 + 216 x^{23} y^9 + 6 x^{22} y^{10} + 432 x^{21} y^{11} + 72 x^{20} y^{12} + 324 x^{19} y^{13} + 324 x^{18} y^{14} + 4 x^{17} y^{15} + 648 x^{16} y^{16} + 48 x^{15} y^{17} + 486 x^{14} y^{18} + 216 x^{13} y^{19} + x^{12} y^{20} + 432 x^{11} y^{21} + 12 x^{10} y^{22} + 324 x^9 y^{23} + 54 x^8 y^{24} + 108 x^6 y^{26} + 81 x^4 y^{28}\).

The following result gives the rank of a 1-generator GQC code obtained by concatenating the generators of two 1-generator QC codes.

Corollary 2

Let \(\textit{C}_1=\langle f_1(g_1+vq_1+uvr_1), f_2(g_1+vq_1+uvr_1),\ldots ,f_{\ell _1}(g_1+vq_1+uvr_1)\rangle \) be a free 1-generator QC code of length \(n_1=m_1{\ell }_1\), \(m_1\) odd and of index \({\ell }_1\) with \(h_1=\frac{x^{m_1}-1}{g_1+vq_1+uvr_1}\). Let \(\textit{C}_2=\langle (f^\prime _1(g_2+vq_2+uvr_2), f^\prime _2(g_2+vq_2+uvr_2),\ldots ,f^\prime _{\ell _2}(g_2+vq_2+uvr_2))\rangle \) be a free 1-generator QC code of length \(n_2=m_2{\ell }_2\), \(m_2\) odd, and of index \({\ell }_2\) with \(h_2=\frac{x^{m_2}-1}{g_2+vq_2+uvr_2}\), as defined in Corollary 1. Let \(\textit{C}\) be a linear code obtained by concatenating \(\textit{C}_1\) and \(\textit{C}_2\). Then

  1. 1.

    If \(gcd(h_1,h_2)=1\), then \(\textit{C}\) is a free 1-generator GQC code of length \((m_1,\ldots ,m_1,m_2,\ldots ,m_2)\) with rank\(=\mathrm {deg}(h_1h_2)\) and \(d_\mathrm{L}(\textit{C})\ge \mathrm {min}\{d_\mathrm{L}(\textit{C}_1), d_\mathrm{L}(\textit{C}_2)\}\);

  2. 2.

    If \(h_1|h_2\), then \(\textit{C}\) is a free 1-generator GQC code of length \((m_1,\ldots ,m_1,m_2,\ldots ,m_2)\) with rank\(=\mathrm {deg}(h_1)\) and \(d_\mathrm{H}(\textit{C})\ge d_\mathrm{H}(\textit{C}_2)\).

Example 13

Let \(\textit{C}_1\) be the cyclic code of length 5 over \(\mathrm {R}\) generated by \(x^4+x^3+x^2+x+1\). \(\textit{C}_1\) is a free code with parameters \((5,16^1,5)\). Let \(\textit{C}_2\) be the cyclic code of length 7 over \(\mathrm {R}\) generated by \(x^4+x^3+x^2+1\). \(\textit{C}_2\) is a free cyclic code with parameters \((7,16^3,4)\). From Corollary 2, we have \(h_1=\frac{x^7-1}{x^4+x^3+x^2+x+1}=x+1\), \(h_2=\frac{x^7-1}{x^4+x^3+x^2+1}=x^3+x^2+1\) and \(\mathrm {gcd}(h_1,h_2)=1\). Therefore, the code \(\textit{C}\) obtained by concatenating the generators of \(\textit{C}_1\) and \(\textit{C}_2\) forms a 1-generator GQC code of block length (5, 7) with \(d_\mathrm{L}(\textit{C})\ge \mathrm {min}\{5,4 \}=4\). In fact, the minimum Lee distance of \(\textit{C}\) over \(\mathrm {R}\) is 4.

Example 14

Let \(\textit{C}_1\) be the cyclic code of length 7 over \(\mathrm {R}\) generated by \(x^3+x+1\). \(\textit{C}_1\) is a free code with parameters \((7,16^4,3)\). Let \(\textit{C}_2\) be the cyclic code of length 5 over \(\mathrm {R}\) generated by \(x^4+x^3+x^2+x+1\). \(\textit{C}_2\) is a free cyclic code with parameters \((5,16^1,5)\). From Corollary 2, we have \(h_1=\frac{x^7-1}{x^3+x+1}=(x+1)(x^3+x^2+1)\), \(h_2=\frac{x^5-1}{x^4+x^3+x^2+x+1}=x-1\) and \(h_2\) divides \(h_1\). Therefore, the code \(\textit{C}\) obtained by concatenating the generators of \(\textit{C}_1\) and \(\textit{C}_2\) forms a 1-generator GQC code of block length (7, 5) with \(d_\mathrm{L}(\textit{C})\ge d_\mathrm{L}(\textit{C}_1)=3\). In fact, the Lee distance of \(\textit{C}\) is 3.

Remark 2

The results obtained in Sects. 6 and 7 can be extended similarly for 1-generator QC codes and 1-generator GQC codes generated by a generator of the form \({\mathscr {F}}=(f_1g_1+uq_1+uvr_1, f_2g_2+uq_2+uvr_2,\cdots ,f_\ell g_{\ell }+uq_{\ell }+uvr_{\ell })\).

Remark 3

Straightforward generalization of the result given in Theorem 13 for the 1-generator QC codes of length \(n=ml\) over \(\mathrm {R}\) generated by \({\mathscr {F}}=(f_1g_1+up_1+vq_1+uvr_1, f_2g_2+up_2+vq_2+uvr_2,\cdots ,f_\ell g_{\ell }+up_{\ell }+vq_\ell +uvr_{\ell })\) merely gives a spanning set, it need not be minimal.

Table 1 provides some optimal binary codes obtained from the Gray images of quasi-cyclic codes over \(\mathrm {R}\) of index 2. Table 1 is obtained manually, and the code parameters marked with \(*\) denote an optimal code according to [15].

Table 1 Some good binary codes obtained from the gray images of quasi-cyclic codes over \(\mathrm {R}\)

8 Conclusion

In this paper we have studied \((1+\lambda u)\)-constacyclic codes of length \(2^k\) over the ring \(\mathrm {R}= {\mathbb {F}}_2+u{\mathbb {F}}_2+v{\mathbb {F}}_2+uv{\mathbb {F}}_2\). We have obtained the structure of annihilators of these codes. We determined the structure of \((1+\lambda u)\)-constacyclic codes of length \(2^k\) over \(\mathrm {R}\) that are contained, and equal to their annihilators. We enumerated these class of codes by giving mass formulas. An optimal code is also presented. It will be interesting to extend the study to constacyclic codes of arbitrary length over \(\mathrm {R}\).

We have also studied the structure of a class of 1-generator QC codes over the ring \(\mathrm {R}\). We have determined the size of these codes by giving their minimal spanning sets. A sufficient condition that a 1-generator QC codes over \(\mathrm {R}\) to be free is given. We have discussed some lower bounds for these codes. Extending the study for more general setting and an extensive search for codes with good parameters is future interesting problem.