1 Introduction and preliminaries

The class of self-dual codes is an interesting topic in coding theory due to their connections to other fields of mathematics such as lattices, cryptography, invariant theory, block designs [5], etc. In many instances, self-dual codes have been found by first finding a code over a ring and then mapping this code onto a code over a subring through a map that preserves duality. In the literatures, the mappings typically map to codes over \(\mathbb {F}_2\), \(\mathbb {F}_4\) and \(\mathbb {Z}_4\) since codes over these rings have had the most use.

Throughout this paper, let \(\mathbb {F}_{2^m}\) be a finite field of \(2^m\) elements and denote

\(R=\frac{\mathbb {F}_{2^m}[u]}{\langle u^k\rangle }=\mathbb {F}_{2^m} +u\mathbb {F}_{2^m}+\cdots +u^{k-1}\mathbb {F}_{2^m} \ (u^k=0),\)

where \(k\in \mathbb {Z}^{+}\) satisfying \(k\ge 2\). Then R is a finite chain ring. Let N be a fixed positive integer and denote \(R^N=\{(a_0,a_1,\ldots ,a_{N-1})\mid a_0,a_1,\ldots ,a_{N-1}\in R\}\). Then \(R^N\) is a free R-module with the usual componentwise addition and scalar multiplication by elements of R. Any R-submodule \(\mathcal {C}\) of \(R^N\) is called a linear code over R of length N. Moreover, the linear code \(\mathcal {C}\) is said to be cyclic if \((c_{N-1},c_0,\ldots ,c_{N-2})\in \mathcal {C}\) for all \((c_0,\ldots ,c_{N-2},c_{N-1})\in \mathcal {C}\). The usual Euclidean inner product on \(R^N\) is defined by: \([\alpha ,\beta ]=\sum _{i=0}^{N-1}a_ib_i\in R\) for all \(\alpha =(a_0,a_1,\ldots ,a_{N-1}), \beta =(b_0,b_1,\ldots ,b_{N-1})\in R^N\). Then the dual code of \(\mathcal {C}\) is defined by \(\mathcal {C}^{\bot }=\{\beta \in R^N\mid [\alpha ,\beta ]=0, \ \forall \alpha \in \mathcal {C}\}\), and \(\mathcal {C}\) is said to be self-dual (resp. self-orthogonal) if \(\mathcal {C}=\mathcal {C}^{\bot }\) (resp. \(\mathcal {C}\subseteq \mathcal {C}^{\bot }\)).

When \(k=2\) and \(m=1\), cyclic codes, self-dual codes and Type II codes over \(\mathbb {F}_2+u\mathbb {F}_2\) were studied by [6] and [10]. Ling and Solé studied Type II codes over the ring \(\mathbb {F}_4+u\mathbb {F}_4\) in [16], which was later generalized to the ring \(R=\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) in [4]. The common theme in the aforementioned works is that the map \(\phi \), defined by \(\phi (a+bu)=(b,a+b)\) for all \(a,b\in \mathbb {F}_{2^m}\), is a distance and duality preserving Gray map from R onto \(\mathbb {F}_{2^m}^2\). The map \(\phi \) takes codes over R of length N to codes over \(\mathbb {F}_{2^m}\) of length 2N. There were many literatures on the construction of binary self-dual codes from various kind of codes over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) for \(m=1,2\). Please refer to the literature [12,13,14,15].

When \(k\ge 3\), for any finite field \(\mathbb {F}_q\) of q elements, several different Gray type maps were defined, in similar fashion obtaining different notions of distance for linear codes over \(\frac{\mathbb {F}_q[u]}{\langle u^k\rangle }\), and a method to obtain explicitly new self-dual codes over \(\mathbb {F}_q\) of larger length was presented from self-dual codes over \(\frac{\mathbb {F}_q[u]}{\langle u^k\rangle }\) in [3]. Hence the construction and enumeration for self-dual codes over \(\frac{\mathbb {F}_q[u]}{\langle u^k\rangle }\) for various prime power q and positive integer k becomes a central topic in coding theory over finite rings.

Let \(\frac{R[x]}{\langle x^N-1\rangle }=R[x]/\langle x^N-1\rangle =\{\sum _{0\le i\le N-1}a_ix^i\mid a_0,a_1,\ldots ,a_{N-1}\in R\}\) in which the arithmetic is done modulo \(x^N-1\). In this paper, cyclic codes over R of length N are identified with ideals of the ring \(\frac{R[x]}{\langle x^N-1\rangle }\), under the map

$$\begin{aligned} \sigma : R^N \rightarrow R[x]/\langle x^N-1\rangle \ \mathrm{via} \ \sigma : (a_0,a_1,\ldots ,a_{N-1})\mapsto \sum _{i=0}^{N-1}a_ix^i \end{aligned}$$

(\(\forall a_0,a_1,\ldots ,a_{N-1}\in R\)). Moreover, ideals of \(\frac{R[x]}{\langle x^N-1\rangle }\) are called simple-root cyclic codes over R when N is relatively prime to the characteristic of R and called repeated-root cyclic codes otherwise.

There were many literatures on cyclic codes of length N over finite chain rings \(R=\mathbb {F}_{2^m}[u]/\langle u^k\rangle \) for various positive integers mkN. For example: When \(k=2\), cyclic codes and self-dual codes over \(\mathbb {F}_2+u\mathbb {F}_2\) of odd length N were investigated in [6]. Norton and Sălăgean [17] discussed simple-root cyclic codes over an arbitrary finite chain ring R systematically. Dinh [9] studied constacyclic codes over Galois extension rings of \(\mathbb {F}_2+u\mathbb {F}_2\) of length \(N=2^s\).

When \(k\ge 3\), in 2007 Abualrub and Siap [1] studied cyclic codes over the rings \(\mathbb {Z}_2+u\mathbb {Z}_2\) and \(\mathbb {Z}_2+u\mathbb {Z}_2+u^2\mathbb {Z}_2\) of the length n, where either n is odd or \(n=2k\) (k is odd) or n is a power of 2. This paper did not investigate self-dual cyclic codes over rings \(\mathbb {Z}_2+u\mathbb {Z}_2\) and \(\mathbb {Z}_2+u\mathbb {Z}_2+u^2\mathbb {Z}_2\), but asked a question:

\(\diamondsuit \) Open problems include the study of self-dual codes and their properties.

In 2011, Al-Ashker and Hamoudeh [2] extended some of the results in [1], and studied cyclic codes of an arbitrary length over the ring \(\mathbb {Z}_2+u\mathbb {Z}_2+u^2\mathbb {Z}_2+\cdots +u^{k-1}\mathbb {Z}_2\) with \(u^k=0\). The rank and minimal spanning set of this family of codes were studied and two open problems were asked:

\(\diamondsuit \) The study of cyclic codes of an arbitrary length over \(\mathbb {Z}_p+u\mathbb {Z}_p+u^2\mathbb {Z}_p+\cdots +u^{k-1}\mathbb {Z}_p\), where p is a prime integer, \(u^k=0\), and the study of dual and self-dual codes and their properties over these rings.

In 2015, Singh et al. [19] studied cyclic code over the ring \(R_{k,p}=\mathbb {Z}_p[u]/\langle u^k\rangle \) \(=\mathbb {Z}_p+u\mathbb {Z}_p+u^2\mathbb {Z}_p+\cdots +u^{k-1}\mathbb {Z}_p\) for any prime integer p and positive integer N, where N allows that p|N. However, the dual code and self-duality for each cyclic code over \(R_{k,p}\) were not considered in [19].

In 2016, Chen et al. [8] gave some new necessary and sufficient conditions for the existence of nontrivial self-dual simple-root cyclic codes over finite commutative chain rings and studied explicit enumeration formulas for these codes. But self-dual repeated-root cyclic codes over finite commutative chain rings were not considered in [8].

In 2015, Sangwisut et al. [18] studied the hulls of simple-root cyclic and negacyclic codes over a finite field \(\mathbb {F}_q\). Based on the characterization of their generator polynomials, the dimensions of the hulls of cyclic and negacyclic codes over \(\mathbb {F}_q\) were determined and the enumerations for hulls of cyclic codes and negacyclic codes over \(\mathbb {F}_q\) were established. However, in the literature, the representation for the hulls of repeated-root cyclic codes over the ring \(\mathbb {F}_q+u\mathbb {F}_q\) (\(u^2=0\)) have not been well studied.

In 2016, we [7] gave a different approach from [1, 2] and [19] to study cyclic code over \(R=\frac{\mathbb {F}_{2^m}[u]}{\langle u^k\rangle }\) of length 2n for any odd positive integer n. We provided an explicit representation for each cyclic code, gave clear formulas to calculate the number of codewords in each code and the number of all these cyclic codes respectively. In particular, we determined the dual code for each code and presented a criterion to judge whether a cyclic code over R of length 2n is self-dual. Based on that, we study the self-duality and hulls of cyclic codes over \(\frac{\mathbb {F}_{2^m}[u]}{\langle u^k\rangle }\) with oddly even length in this paper.

The present paper is organized as follows. In Sect. 2, we introduce necessary notations and sketch known results for cyclic codes over R of length 2n needed in this paper. In Sect. 3, we give an explicit representation and enumeration for self-dual cyclic codes over R of length 2n. Moreover, we obtain a clear Mass formula to count all these codes. In Sect. 4, we provide a generator matrix for each self-dual 2-quasi-cyclic code of length 4n over \(\mathbb {F}_{2^m}\) derived by a self-deal cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\). As an application, we list all 945 self-dual cyclic codes of length 30 over \(\mathbb {F}_2+u\mathbb {F}_2\). In Sect. 5, we determine the hull of each cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\), and give an explicit representation and enumeration for all distinct self-orthogonal cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\). Section 6 concludes the paper.

2 Known results for cyclic codes over R of length 2n

In this section, we list the necessary notations and known results for cyclic codes of length 2n over the ring \(R=\frac{\mathbb {F}_{2^m}[u]}{\langle u^k\rangle }\) needed in the following sections.

As n is odd, there are pairwise coprime monic irreducible polynomials \(f_1(x)=x-1,f_2(x),\ldots ,f_r(x)\) in \(\mathbb {F}_{2^m}[x]\) such that

$$\begin{aligned} x^n-1=f_1(x)f_2(x)\ldots f_r(x). \end{aligned}$$
(1)

Then we have \(x^{2n}-1=(x^n-1)^2=f_1(x)^2\ldots f_r(x)^2\).

Let \(1\le j\le r\). We assume \(\mathrm{deg}(f_j(x))=d_j\) and denote \(F_j(x)=\frac{x^{2n}-1}{f_j(x)^2}\). Then \(\mathrm{gcd}(F_j(x),f_j(x)^2)=1\), and hence there exist \(a_j(x),b_j(x)\in \mathbb {F}_{2^m}[x]\) such that \( a_j(x)F_j(x)+b_j(x)f_j(x)^2=1. \)

As in [7], we adopt the following notations in this paper:

  • \(\mathcal {A}=\frac{\mathbb {F}_{2^m}[x]}{\langle x^{2n}-1\rangle }=\{\sum _{i=0}^{2n-1}a_ix^i\mid a_i\in \mathbb {F}_{2^m}, \ i=0,1,\ldots , 2n-1\}\) in which the arithmetic is done modulo \(x^{2n}-1\).

  • Let \(\varepsilon _j(x)\in \mathcal {A}\) be defined by

    $$\begin{aligned} \varepsilon _j(x)\equiv a_j(x)F_j(x)=1-b_j(x)f_j(x)^2 \ (\mathrm{mod} \ x^{2n}-1). \end{aligned}$$

    Then \(\varepsilon _j(x)^2=\varepsilon _j(x)\) and \(\varepsilon _j(x)\varepsilon _l(x)=0\) in the ring \(\mathcal {A}\) for all \(j\ne l\) and \(j,l=1,\ldots ,r\) (cf. [7, Theorem 2.3]).

  • \(\mathcal {K}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)^2\rangle }=\{\sum _{i=0}^{2d_j-1}a_ix^i\mid a_i\in \mathbb {F}_{2^m}, \ i=0,1,\ldots , 2d_j-1\}\) in which the arithmetic is done modulo \(f_j(x)^2\).

  • \(\mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle }=\{\sum _{i=0}^{d_j-1}a_ix^i\mid a_i\in \mathbb {F}_{2^m}, \ i=0,1,\ldots , d_j-1\}\) in which the arithmetic is done modulo \(f_j(x)\). Then \(\mathcal{F}_j\) is an extension field of \(\mathbb {F}_{2^m}\) with \(2^{md_j}\) elements.

  • For each \(\Upsilon \in \{\mathcal {A},\mathcal {K}_j,\mathcal {F}_j\}\), we set

    $$\begin{aligned} \frac{\Upsilon [u]}{\langle u^k\rangle } =\{\alpha _0+u\alpha _1+\cdots +u^{k-1}\alpha _{k-1}\mid \alpha _0,\alpha _1,\ldots ,\alpha _{k-1}\in \Upsilon \} \ (u^k=0). \end{aligned}$$

Remark \(\mathcal {F}_j\) is a finite field with operations defined by the usual polynomial operations modulo \(f_j(x)\), \(\mathcal {K}_j\) is a finite chain ring with operations defined by the usual polynomial operations modulo \(f_j(x)^2\) (cf. [7, Lemma 2.4(v)]) and \(\mathcal {A}\) is a finite principal ideal ring with operations defined by the usual polynomial operations modulo \(x^{2n}-1\). As in [7], we adopt the following points of view:

$$\begin{aligned} \mathcal {F}_j\subseteq \mathcal {K}_j \subseteq \mathcal {A} \ \mathrm{and} \ \frac{\mathcal {F}_j[u]}{\langle u^k\rangle }\subseteq \frac{\mathcal {K}_j[u]}{\langle u^k\rangle } \subseteq \frac{\mathcal {A}[u]}{\langle u^k\rangle } \end{aligned}$$

only as sets. Obviously, \(\mathcal {F}_j\) is not a subfield of \(\mathcal {K}_j\), \(\mathcal {K}_j\) is not a subring of \(\mathcal {A}\), \(\frac{\mathcal {F}_j[u]}{\langle u^k\rangle }\) is not a subring of \(\frac{\mathcal {K}_j[u]}{\langle u^k\rangle }\) and \(\frac{\mathcal {K}_j[u]}{\langle u^k\rangle }\) is not a subring of \(\frac{\mathcal {A}[u]}{\langle u^k\rangle }\), when \(n\ge 2\).

For any \(\alpha (x)=\sum _{i=0}^{2n-1}\alpha _ix^i\in \frac{R[x]}{\langle x^{2n}-1\rangle }\), where \(\alpha _i=\sum _{j=0}^{k-1}a_{i,j}u^j\in R\) with \(a_{i,j}\in \mathbb {F}_{2^m}\) for all \(i=0,1,\ldots ,2n-1\) and \(j=0,1,\ldots ,k-1\), we define

$$\begin{aligned} \varPsi (\alpha (x))=a_0(x)+a_1(x)u+\cdots +a_{k-1}(x)u^{k-1}\in \frac{\mathcal{A}[u]}{\langle u^k\rangle } \end{aligned}$$

where \(a_j(x)=\sum _{i=0}^{2n-1}a_{i,j}x^i\in \mathcal{A}\) for all \(j=0,1,\ldots ,k-1.\) Then the map \(\varPsi \) is a ring isomorphism from \(\frac{R[x]}{\langle x^{2n}-1\rangle }\) onto \(\frac{\mathcal{A}[u]}{\langle u^k\rangle }\) (cf. [7], Lemma 2.2).

As in [7], we identify \(\frac{R[x]}{\langle x^{2n}-1\rangle }\) with \(\frac{\mathcal{A}[u]}{\langle u^k\rangle }\) under this ring isomorphism \(\varPsi \) in the rest of this paper. From this, we deduce that \(\mathcal {C}\) is a cyclic code over R of length 2n, i.e. \(\mathcal {C}\) is an ideal of \(\frac{R[x]}{\langle x^{2n}-1\rangle }\), if and only if \(\mathcal {C}\) is an ideal of the ring \(\frac{\mathcal {A}[u]}{\langle u^k\rangle }\). Then in order to determine cyclic codes over R of length 2n, it is sufficient to determine ideals of the ring \(\frac{\mathcal{A}[u]}{\langle u^k\rangle }\).

First, every ideal of the ring \(\frac{\mathcal{A}[u]}{\langle u^k\rangle }\) can be determined by a unique ideal of \(\frac{\mathcal{K}_j[u]}{\langle u^k\rangle }\) for each \(j=1,\ldots ,r\). See the following lemma.

Lemma 2.1

(cf. [7, Theorem 2.3]) Let \(\mathcal {C}\subseteq \frac{\mathcal {A}[u]}{\langle u^k\rangle }\). Then \(\mathcal {C}\) is a cyclic code over R of length 2n if and only if for each integer j, \(1\le j\le r\), there is a unique ideal \(C_j\) of the ring \(\frac{\mathcal {K}_j[u]}{\langle u^k\rangle }\) such that

$$\begin{aligned} \mathcal {C}=\bigoplus _{j=1}^r\varepsilon _j(x)C_j=\sum _{j=1}^r\varepsilon _j(x)C_j \ (\mathrm{mod} \ x^{2n}-1), \end{aligned}$$

where \(\varepsilon _j(x)C_j=\{\varepsilon _j(x)c_j(x) \ (\mathrm{mod} \ x^{2n}-1)\mid c_j(x)\in C_j\}\subseteq \frac{\mathcal {A}[u]}{\langle u^k\rangle }\) for all \(j=1,\ldots ,r\). Moreover, the number of codewords in \(\mathcal {C}\) is equal to \(\prod _{j=1}^r|C_j|\).

To present all distinct ideals of the ring \(\mathcal{K}_j[u]/\langle u^k\rangle \) for all \(j=1,\ldots ,r\), we need the following lemma.

Lemma 2.2

(cf. [7, Lemma 2.4 (ii)–(iv)]) Using the notations above, for any integers js: \(1\le j\le r\) and \(1\le s\le k\), we have the following:

  1. (i)

    The ring \(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle }\) is a finite commutative chain ring with the unique maximal ideal \(u(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle })\), the nilpotency index of u is equal to s and the residue field of \(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle }\) is \((\frac{\mathcal{F}_j[u]}{\langle u^s\rangle })/u(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle }) \cong \mathcal{F}_j\).

  2. (ii)

    Every element \(\alpha \) of \(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle }\) has a unique u-adic expansion:

    $$\begin{aligned} \alpha =b_0(x)+ub_1(x)+\cdots +u^{s-1}b_{s-1}(x), \ b_0(x),b_1(x),\ldots ,b_{s-1}(x)\in \mathcal{F}_j \end{aligned}$$

    Moreover, \(\alpha \) is an invertible element of \(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle }\) if and only if \(b_0(x)\ne 0\). The set of all invertible elements of \(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle }\) is denoted by \((\frac{\mathcal{F}_j[u]}{\langle u^s\rangle })^\times \).

  3. (iii)

    \(|(\frac{\mathcal{F}_j[u]}{\langle u^s\rangle })^{\times }|=(2^{md_j}-1)2^{(s-1)md_j}\).

Using the notation of Lemma 2.2, all ideals of \(\frac{\mathcal{K}_j[u]}{\langle u^k\rangle }\) are listed as follows:

Lemma 2.3

([7, Theorem 2.6]) Let \(1\le j\le r\). Then all distinct ideals of the ring \(\frac{\mathcal{K}_j[u]}{\langle u^k\rangle }\) are given by the following table:

Number of ideals

\(C_j\) (ideal of \(\frac{\mathcal{K}_j[u]}{\langle u^k\rangle }\))

\(|C_j|\)

\(k+1\)

\(\bullet \) \(\langle u^i\rangle \)\((0\le i\le k)\)

\(2^{2md_j(k-i)}\)

k

\(\bullet \) \(\langle u^s f_j(x)\rangle \)\((0\le s\le k-1)\)

\(2^{md_j(k-s)}\)

\(\varOmega _1(2^{md_j},k)\)

\(\bullet \) \(\langle u^i+u^tf_j(x)\omega \rangle \)

\(2^{2md_j(k-i)}\)

 

    (\(\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{i-t}\rangle })^{\times }\), \(t\ge 2i-k\),

 
 

    \( 0\le t<i\le k-1)\)

 

\(\varOmega _2(2^{md_j},k)\)

\(\bullet \) \(\langle u^i+u^tf_j(x)\omega \rangle \)

\(2^{md_j(k-t)}\)

 

    (\(\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{k-i}\rangle })^{\times }\), \(t< 2i-k\),

 
 

    \( 0\le t<i\le k-1)\)

 

\(\frac{1}{2}k(k-1)\)

\(\bullet \) \(\langle u^i,u^sf_j(x)\rangle \)

\(2^{md_j(2k-(i+s))}\)

 

\( \ \ (0\le s<i\le k-1)\)

 

\((2^{md_j}-1)\)

\(\bullet \) \(\langle u^i+u^tf_j(x)\omega , u^sf_j(x)\rangle \)

\(2^{md_j(2k-(i+s))}\)

\(\cdot \varGamma (2^{md_j},k)\)

\((\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{s-t}\rangle })^{\times }\), \(i+s\le k+t-1\),

 
 

    \(0\le t<s<i\le k-2)\)

 

where \(|C_j|\) is the number of elements in \(C_j\), and

  • \(\diamond \) \(\varOmega _1(2^{md_j},k)=\left\{ \begin{array}{ll}\frac{2^{md_j(\frac{k}{2}+1)}+ 2^{md_j\cdot \frac{k}{2}}-2}{2^{md_j}-1}-(k+1), &{} \mathrm{if} \ k \ \mathrm{is} \ \mathrm{even};\\ \frac{2(2^{md_j\cdot \frac{k+1}{2}}-1)}{2^{md_j}-1}-(k+1), &{} \mathrm{if} \ k \ \mathrm{is} \ \mathrm{odd}.\end{array}\right. \)

  • \(\diamond \) \(\varOmega _2(2^{md_j},k)=\left\{ \begin{array}{ll}(2^{md_j}-1) \sum _{i=\frac{k}{2}+1}^{k-1}(2i-k)2^{md_j(k-i-1)}, &{} \mathrm{if} \ k \ \mathrm{is} \ \mathrm{even};\\ (2^{md_j}-1)\sum _{i=\frac{k+1}{2}}^{k-1}(2i-k)2^{md_j(k-i-1)}, &{} \mathrm{if} \ k \ \mathrm{is} \ \mathrm{odd}.\end{array}\right. \)

  • \(\diamond \) \(\varGamma (2^{md_j},k)\) can be calculated by the following recurrence formula:

    • \(\varGamma (2^{md_j},\rho )=0\) for \(\rho =1,2,3\); \(\varGamma (2^{md_j},\rho )=1\) for \(\rho =4\);

    • \(\varGamma (2^{md_j},\rho )=\varGamma (2^{md_j},\rho -1)+\sum _{s=1}^{\lfloor \frac{\rho }{2}\rfloor -1}(\rho -2s-1)2^{md_j(s-1)}\) for \(\rho \ge 5\).

Therefore, the number of all distinct ideals of the ring \(\mathcal{K}_j[u]/\langle u^k\rangle \) is equal to

$$\begin{aligned} N_{(2^m,d_j,k)}=1+\frac{k(k+3)}{2}+\varOmega _1(2^{md_j},k)+\varOmega _2(2^{md_j},k)+(2^{md_j}-1)\varGamma (2^{md_j},k). \end{aligned}$$

As the end of this section, we give an explicit formula to count the number of all cyclic codes over R of length 2n.

Theorem 2.4

Using the notation above, let \(1\le j\le r\).

  1. (i)

    The number of all distinct ideals of the ring \(\mathcal{K}_j[u]/\langle u^k\rangle \) is

    $$\begin{aligned} N_{(2^m,d_j,k)}=\left\{ \begin{array}{ll}\sum _{i=0}^{\frac{k}{2}}(1+4i)2^{(\frac{k}{2}-i)md_j}, &{} \mathrm{if} \ k \ \mathrm{is} \ \mathrm{even}; \\ \sum _{i=0}^{\frac{k-1}{2}}(3+4i)2^{(\frac{k-1}{2}-i)md_j}, &{} \mathrm{if} \ k \ \mathrm{is} \ \mathrm{odd}.\end{array}\right. \end{aligned}$$
    (2)

    Precisely, we have

    • \(N_{(2^m,d_j,k)}=\frac{(2^{md_j}+3)2^{(\frac{k}{2}+1)md_j}-2^{md_j}(2k+5)+2k+1}{(2^{md_j}-1)^2}\), when k is even;

    • \(N_{(2^m,d_j,k)}=\frac{(3\cdot 2^{md_j}+1)2^{(\frac{k-1}{2}+1)md_j}-2^{md_j}(2k+5)+2k+1}{(2^{md_j}-1)^2}\), when k is odd.

  2. (ii)

    The number of cyclic codes over \(\mathbb {F}_{2^m}[u]/\langle u^k\rangle \) of length 2n is equal to

    • \(\prod _{j=1}^r\frac{(2^{md_j}+3)2^{(\frac{k}{2}+1)md_j}-2^{md_j}(2k+5)+2k+1}{(2^{md_j}-1)^2}\), when k is even;

    • \(\prod _{j=1}^r\frac{(3\cdot 2^{md_j}+1)2^{(\frac{k-1}{2}+1)md_j}-2^{md_j}(2k+5)+2k+1}{(2^{md_j}-1)^2}\), when k is odd.

Proof

(i) By the mathematical induction on k, one can easily verify that the equation (2) holds.

Now, let \(k=2s+1\) where s is a positive integer, and denote \(q=2^{md_j}\). Then we have \(N_{(2^m,d_j,k)}=\sum _{i=0}^{s}(3+4i)q^{s-i}=3\sum _{i=0}^{s}q^{s-i}+4q^s \sum _{i=0}^{s}iq^{-i}\) in which \(\sum _{i=0}^{s}q^{s-i}=\frac{q^{s+1}-1}{q-1}\). Then by

$$\begin{aligned} \sum _{i=1}^{s}ix^{i-1}= & {} \frac{d}{dx}\left( \sum _{i=0}^{s}x^{i}\right) =\frac{d}{dx} \left( \frac{x^{s+1}-1}{x-1}\right) = \frac{(s+1)x^{s}(x-1)-(x^{s+1}-1)}{(x-1)^2}, \end{aligned}$$

we have

$$\begin{aligned} q^s\sum _{i=0}^{s}iq^{-i}= & {} q^{s-1}\sum _{i=1}^{s}i(q^{-1})^{i-1}=q^{s-1} \cdot \frac{(s+1)q^{-s} (q^{-1}-1)-(q^{-(s+1)}-1)}{(q^{-1}-1)^2}\\= & {} q^{s-1}\cdot \frac{q^{-s+1}}{(q-1)^2}\left( q^{s+1}-q(s+1)+s\right) . \end{aligned}$$

From these, we deduce \(N_{(2^m,d_j,k)}=3\cdot \frac{q^{s+1}-1}{q-1} +4\cdot \frac{1}{(q-1)^2}\left( q^{s+1}-q(s+1)+s\right) \), and hence \(N_{(2^m,d_j,k)}=\frac{(3q+1)q^{s+1}-q(4s+7)+4s+3}{(q-1)^2}\) where \(s=\frac{k-1}{2}\).

When k is even, the conclusion can be proved similarly. We omit this here.

(ii) It follows from (i) and Lemma 2.1. \(\square \)

For the special cases of \(k=2,3,4,5\), we have the following conclusions.

Corollary 2.5

Let \(2\le k\le 5\). The number of all ideals in \(\mathcal{K}_j[u]/\langle u^k\rangle \) is

$$\begin{aligned} N_{(2^m,d_j,k)}=\left\{ \begin{array}{ll}5+2^{d_jm}, &{} \mathrm{when} \ k=2; \\ 9+5\cdot 2^{d_jm}+2^{2d_jm}, &{} \mathrm{when} \ k=4; \\ 7+3\cdot 2^{d_jm}, &{} \mathrm{when} \ k=3; \\ 11+7\cdot 2^{d_jm}+3\cdot 2^{2d_jm}, &{} \mathrm{when} \ k=5.\end{array}\right. \end{aligned}$$

Finally, let \(n=1\) and \(m=1\). Then \(r=1\) and \(d_1=1\) in this case. We denote by \(L_k\) the number of ideals in the ring \(\frac{(\mathbb {F}_2+u\mathbb {F}_2+\cdots +u^{k-1}\mathbb {F}_2)[x]}{\langle x^2-1\rangle }\), where \(k\ge 2\). By Theorem 2.4, we have that

$$\begin{aligned} L_k=N_{(2,1,k)}=\left\{ \begin{array}{ll} 10\cdot 2^{\frac{k}{2}}-2k-9 &{} \mathrm{if} \ 2\mid k;\\ 14\cdot 2^{\frac{k-1}{2}}-2k-9 &{} \mathrm{if} \ 2\not \mid k. \end{array}\right. \end{aligned}$$

For examples, we have \(L_2=7\), \(L_4=23\), \(L_6=59\), \(L_8=135\); \(L_3=13\), \(L_5=37\), \(L_7=89\) and \(L_9=197\).

3 An explicit representation and enumeration for self-dual cyclic codes over R of length 2n

In this section, we give an explicit representation for self-dual cyclic codes over R of length 2n and a precise mass formula to count the number of these codes.

For any polynomial \(f(x)=\sum _{l=0}^da_lx^l\in \mathbb {F}_{2^m}[x]\) of degree \(d\ge 1\), recall that the reciprocal polynomial of f(x) is defined as \(\widetilde{f}(x)=x^df(\frac{1}{x})=\sum _{l=0}^da_lx^{d-l}\), and f(x) is said to be self-reciprocal if \(\widetilde{f}(x)=\delta f(x)\) for some \(\delta \in \mathbb {F}_{2^m}^{\times }\). Then by Eq. (1) in Sect. 2, it follows that

$$\begin{aligned} x^{n}-1=x^{n}+1=\widetilde{f}_1(x)\widetilde{f}_2(x)\ldots \widetilde{f}_r(x). \end{aligned}$$

Since \(f_1(x)=x+1,f_2(x),\ldots ,f_r(x)\) are pairwise coprime monic irreducible polynomials in \(\mathbb {F}_{2^m}[x]\), \(\widetilde{f}_1(x)=x+1,\widetilde{f}_2(x),\ldots , \widetilde{f}_r(x)\) are pairwise coprime irreducible polynomials in \(\mathbb {F}_{2^m}[x]\) as well. Hence for each integer j, \(1\le j\le r\), there is a unique integer \(j^{\prime }\), \(1\le j^{\prime }\le r\), such that

$$\begin{aligned} \widetilde{f}_j(x)=\delta _jf_{j^{\prime }}(x) \ \mathrm{where} \ \delta _j\in \mathbb {F}_{2^m}^{\times }. \end{aligned}$$

After a rearrangement of \(f_2(x),\ldots ,f_r(x)\), there are integers \(\lambda ,\epsilon \) such that

  • \(\lambda +2\epsilon =r\) where \(\lambda \ge 1\) and \(\epsilon \ge 0\);

  • \(\widetilde{f}_j(x)=\delta _jf_{j}(x)\), where \(\delta _j\in \mathbb {F}_{2^m}^{\times }\), for all \(j=1,\ldots ,\lambda \);

  • \(\widetilde{f}_j(x)=\delta _jf_{j+\epsilon }(x)\), where \(\delta _j\in \mathbb {F}_{2^m}^{\times }\), for all \(j=\lambda +1,\ldots ,\lambda +\epsilon \).

Let \(1\le j\le r\). Since \(f_{j}(x)^2\) is a divisor of \(x^{2n}-1\), we have \(x^{2n}\equiv 1\) (mod \(f_{j}(x)^2\)), i.e. \(x^{2n}=1\) in the ring \(\mathcal {K}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_{j}(x)^2\rangle }\). This implies that

$$\begin{aligned} x^{-d}=x^{2n-d} \ \mathrm{in} \ \mathcal {K}_j[u]/\langle u^k\rangle , \ 1\le d\le 2n-1. \end{aligned}$$

For any integer s, \(1\le s\le k\), and \(\omega =\omega (x)\in \frac{\mathcal {F}_j[u]}{\langle u^s\rangle }\), by Lemma 2.2(ii) we know that \(\omega (x)\) has a unique u-adic expansion:

$$\begin{aligned} \omega (x)=\sum _{i=0}^{s-1}u^{i}a_{i}(x), \ a_0(x),a_1(x),\ldots ,a_{s-1}(x)\in \mathcal {F}_j. \end{aligned}$$

To simplify the expressions, we adopt the following notation in this paper:

  • \(\widehat{\omega }=\omega (x^{-1})=a_0(x^{-1})+ua_1(x^{-1})+\cdots +u^{s-1}a_{s-1}(x^{-1})\) (mod \(f_j(x)\)), when \(1\le j\le \lambda \);

  • \(\widehat{\omega }=\omega (x^{-1})=a_0(x^{-1})+ua_1(x^{-1})+\cdots +u^{s-1}a_{s-1}(x^{-1})\) (mod \(f_{j+\epsilon }(x)\)), when \(\lambda +1\le j\le \lambda +\epsilon \).

  • \(\varTheta _{j,s}=\{\omega \in (\frac{\mathcal {F}_j[u]}{\langle u^s\rangle })^\times \mid \omega +\delta _jx^{2n-d_j}\widehat{\omega }\equiv 0 \ (\mathrm{mod} \ f_j(x))\}\), where \(1\le j\le \lambda \) and \(1\le s\le k-1\).

For self-dual cyclic codes over R, using the notation above and by [7, Theorem 3.6], we have the following conclusion.

Theorem 3.1

Using the notations above, all distinct self-dual cyclic codes over the ring R of length 2n are given by:

$$\begin{aligned} \mathcal{C}=\left( \oplus _{j=1}^\lambda \varepsilon _j(x)C_j\right) \oplus \left( \oplus _{j=\lambda +1}^{\lambda +\epsilon }(\varepsilon _{j}(x)C_{j}\oplus \varepsilon _{j+\epsilon }(x)C_{j+\epsilon })\right) , \end{aligned}$$

where \(C_j\) is an ideal of \(\mathcal{K}_j[u]/\langle u^k\rangle \) determined by the following conditions:

  1. (i)

    If \(1\le j\le \lambda \), \(C_j\) is determined by the following conditions:

    • (\(\dag \)) When k is even, \(C_j\) is given by one of the following six cases:

      • (\(\dag \)-1) \(C_j=\langle u^{\frac{k}{2}}\rangle \).

      • (\(\dag \)-2) \(C_j=\langle f_j(x)\rangle \).

      • (\(\dag \)-3) \(C_j=\langle u^{\frac{k}{2}}+u^{t}f_j(x)\omega \rangle \), where \(\omega \in \varTheta _{j,\frac{k}{2}-t}\) and \(0\le t\le \frac{k}{2}-1\).

      • (\(\dag \)-4) \(C_j=\langle u^{i}+f_j(x)\omega \rangle \), where \(\omega \in \varTheta _{j,k-i}\) and \(\frac{k}{2}+1\le i\le k-1\).

      • (\(\dag \)-5) \(C_j=\langle u^i,u^{k-i}f_j(x)\rangle \), where \(\frac{k}{2}+1\le i\le k-1\).

      • (\(\dag \)-6) \(C_j=\langle u^{i}+u^{t}f_j(x)\omega , u^{k-i}f_j(x)\rangle \), where \(\omega \in \varTheta _{j,k-i-t}\), \(1\le t<k-i\) and \(\frac{k}{2}+1\le i\le k-2\).

    • (\(\ddag \)) When k is odd, \(C_j\) is given by one of the following four cases:

      • (\(\ddag \)-1) \(C_j=\langle f_j(x)\rangle \).

      • (\(\ddag \)-2) \(C_j=\langle u^{i}+f_j(x)\omega \rangle \), where \(\omega \in \varTheta _{j,k-i}\) and \(\frac{k+1}{2}\le i\le k-1\).

      • (\(\ddag \)-3) \(C_j=\langle u^i,u^{k-i}f_j(x)\rangle \), where \(\frac{k+1}{2}\le i\le k-1\).

      • (\(\ddag \)-4) \(C_j=\langle u^{i}+u^{t}f_j(x)\omega , u^{k-i}f_j(x)\rangle \), where \(\omega \in \varTheta _{j,k-i-t}\), \(1\le t<k-i\) and \(\frac{k+1}{2}\le i\le k-2\).

  2. (ii)

    If \(\lambda +1\le j\le \lambda +\epsilon \), then \((C_j, C_{j+\epsilon })\) is given by one of the \(N_{(2^m,d_j,k)}\) pairs listed in the below table:

\(C_j\) (mod \(f_j(x)^2\))

\(C_{j+\epsilon }\) (mod \(f_{j+\epsilon }(x)^2\))

\(\bullet \) \(\langle u^i\rangle \) \((0\le i\le k)\)

\(\diamond \) \(\langle u^{k-i}\rangle \)

\(\bullet \) \(\langle u^sf_j(x)\rangle \) (\(0\le s\le k-1\))

\(\diamond \) \(\langle u^{k-s},f_{j+\epsilon }(x)\rangle \)

\(\bullet \) \(\langle u^i+u^tf_j(x)\omega \rangle \)

\(\diamond \) \(\langle u^{k-i}+u^{k+t-2i}f_{j+\epsilon }(x)\omega ^{\prime }\rangle \)

      (\(\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{i-t}\rangle })^{\times }\),

\(\omega ^{\prime }=\delta _jx^{2n-d_j}\widehat{\omega }\) (mod \(f_{j+\epsilon }(x)\))

      \(t\ge 2i-k, 0\le t<i\le k-1\))

 

\(\bullet \) \(\langle u^i+f_j(x)\omega \rangle \)

\(\diamond \) \(\langle u^i+f_{j+\epsilon }(x)\omega ^{\prime }\rangle \)

      \((\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{k-i}\rangle })^{\times }\),

\(\omega ^{\prime }=\delta _jx^{2n-d_j}\widehat{\omega }\) (mod \(f_{j+\epsilon }(x)\))

      \(2i>k, 0<i\le k-1\))

 

\(\bullet \) \(\langle u^i+u^{t}f_j(x)\omega \rangle \)

\(\diamond \) \(\langle u^{i-t}+f_{j+\epsilon }(x)\omega ^{\prime },u^{k-i}f_{j+\epsilon }(x)\rangle \)

      \((\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{k-i}\rangle })^{\times }\),

\(\omega ^{\prime }=\delta _jx^{2n-d_j}\widehat{\omega }\) (mod \(f_{j+\epsilon }(x)\))

      \(t<2i-k, 1\le t<i\le k-1\))

 

\(\bullet \) \(\langle u^{i},u^{s}f_j(x)\rangle \)

\(\diamond \) \(\langle u^{k-s},u^{k-i}f_{j+\epsilon }(x)\rangle \)

      \((0\le s<i\le k-1)\)

 

\(\bullet \) \(\langle u^{i}+f_j(x)\omega , u^{s}f_j(x)\rangle \)

\(\diamond \) \(\langle u^{k-s}+u^{k-i-s}f_{j+\epsilon }(x)\omega ^{\prime }\rangle \)

      \((\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^s\rangle })^{\times }\),

\(\omega ^{\prime }=\delta _jx^{2n-d_j}\widehat{\omega }\) (mod \(f_{j+\epsilon }(x)\))

      \(i+s\le k-1, 1\le s<i\le k-1\))

 

\(\bullet \) \(\langle u^{i}+u^{t}f_j(x)\omega , u^{s}f_j(x)\rangle \)

\(\diamond \) \(\langle u^{k-s}+u^{k+t-i-s}f_{j+\epsilon }(x)\omega ^{\prime },\)

      \((\omega \in (\frac{\mathcal{F}_j[u]}{\langle u^{s-t}\rangle })^{\times }\),

\(u^{k-i}f_{j+\epsilon }(x)\rangle \)

      \(i+s\le k+t-1\),

\(\omega ^{\prime }=\delta _jx^{2n-d_j}\widehat{\omega }\) (mod \(f_{j+\epsilon }(x)\))

      \(1\le t<s<i\le k-2)\)

 

To listed all self-dual cyclic codes over R of length 2n, by Theorem 3.1 we need to determine the set \(\varTheta _{j,s}\) of elements \(\omega \in (\mathcal{F}_j[u]/\langle u^{s}\rangle )^{\times }\) satisfying

$$\begin{aligned} \omega +\delta _jx^{2n-d_j}\widehat{\omega }\equiv 0 \ (\mathrm{mod} \ f_j(x)) \end{aligned}$$
(3)

for some integer s, \(1\le s\le k-1\), and for all \(j=1,\ldots ,\lambda \). To do this, we need the following lemma.

Lemma 3.2

Using the notation above, let \(1\le j\le r\). We have the following:

  1. (i)

    \(\delta _j=1\) for all \(j=1,\ldots ,\lambda \).

  2. (ii)

    \(d_1=1\), and \(2\mid d_j\) for all \(j=2,\ldots ,\lambda \).

Proof

(i) As \(1\le j\le \lambda \), we have \(\widetilde{f}_j(x)=\delta _jf_j(x)\) where \(\delta _j\in \mathbb {F}_{2^m}^\times \). Since \(f_j(x)\) is a monic irreducible divisor of \(x^n-1\) in \(\mathbb {F}_{2^m}[x]\), we have that \(f_j(x)=\widetilde{\widetilde{f}_j(x)}=\delta _j \widetilde{f}_j(x)=\delta _j^2f_j(x).\) This implies \(\delta _j^2=1\), and hence \(\delta _j=1\) in \(\mathbb {F}_{2^m}\).

(ii) Assume that \(a\in \mathbb {F}_{2^m}^\times \) and \(f(x)=x-a\) is a self-reciprocal polynomial. Then there exists \(\delta \in \mathbb {F}_{2^m}^\times \) such that \(\delta x-\delta a=\delta f(x)=\widetilde{f}(x)=1-ax\). This implies that \(\delta =-a\) and \(-\delta a=1\). From this, we deduce that \(a^2=1\), and hence \(a=1\). Therefore, \(f_1(x)=x-1\) is the only self-reciprocal and monic irreducible divisor of \(x^n-1\) in \(\mathbb {F}_{2^m}[x]\) with degree 1.

Now, let \(2\le j\le r\). Then \(f_j(x)\) is a self-reciprocal and monic irreducible divisor of \(x^n-1\) in \(\mathbb {F}_{2^m}[x]\) with degree \(\mathrm{deg}(f_j(x))=d_j>1\). This implies that \(d_j\) is even from finite field theory. \(\square \)

Now, all distinct self-dual cyclic codes over R of length 2n can be listed explicitly by Theorem 3.1 and the following theorem.

Theorem 3.3

Using the notation above, let \(1\le j\le r\) and \(1\le s\le k-1\). Then the set \(\varTheta _{j,s}\) is determined as follows:

  1. (i)

    If \(j=1\), then

    $$\begin{aligned} \varTheta _{1,s}=(\frac{\mathbb {F}_{2^m}[u]}{\langle u^{s}\rangle })^{\times } =\left\{ \sum _{i=0}^{s-1}a_iu^i\mid a_0\ne 0, \ a_i\in \mathbb {F}_{2^m}, i=0,1,\ldots , s-1\right\} . \end{aligned}$$

    Hence \(|\varTheta _{1,s}|=(2^m-1)2^{(s-1)m}\).

  2. (ii)

    Let \(2\le j\le r\), and let \(\varrho _j(x)\) be a primitive element of the finite field \(\mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle }\). Then we have

    $$\begin{aligned} \varTheta _{j,1}=\left\{ x^{-\frac{d_j}{2}}\varrho _j(x)^{l(2^{\frac{d_j}{2}m}+1)}\mid l=0,1,\ldots ,2^{\frac{d_j}{2}m}-2\right\} \subseteq \mathcal {F}_j; \end{aligned}$$

    and for any integer s, \(2\le s\le k-1\), we have

    $$\begin{aligned} \varTheta _{j,s}=\left\{ \sum _{i=0}^{s-1}a_i(x)u^i\mid a_0(x)\in \varTheta _{j,1}; \ a_i(x)\in \{0\}\cup \varTheta _{j,1}, 1\le i\le s-1\right\} . \end{aligned}$$

    Therefore, \(|\varTheta _{j,s}|=(2^{\frac{d_j}{2}m}-1)2^{(s-1)\frac{d_j}{2}m}\) for all \(s=1,2,\ldots , k-1\).

Proof

(i) Let \(j=1\). By \(f_1(x)=x-1\) and Lemma 2.2(ii), we have that \(x\equiv 1\) (mod \(f_1(x)\)), \(\mathcal{F}_1=\frac{\mathbb {F}_{2^m}[x]}{\langle x-1\rangle }=\mathbb {F}_{2^m}\) and

$$\begin{aligned} (\mathcal{F}_j[u]/\langle u^{s}\rangle )^{\times }=\left\{ \sum _{i=0}^{s-1}a_iu^i\mid a_0\ne 0, \ a_i\in \mathbb {F}_{2^m}, i=0,1,\ldots , s-1\right\} . \end{aligned}$$

In this case, by Lemma 3.2, Condition (3) is simplified to

$$\begin{aligned} \omega +\widehat{\omega }=\omega +\omega \equiv 0 \ (\mathrm{mod} \ x-1). \end{aligned}$$
(4)

It is clear that every elements \(\omega \in (\mathcal{F}_j[u]/\langle u^{s}\rangle )^{\times }\) satisfies the above condition. Hence \(\varTheta _{1,s}=(\mathcal{F}_j[u]/\langle u^{s}\rangle )^{\times }\) and \(|\varTheta _{1,s}|=(2^m-1)2^{(s-1)m}\).

(ii) Let \(2\le j\le \lambda \). Then \(d_j\) is even and it is well known that

$$\begin{aligned} x^{-1}=x^{2^{m\frac{d_j}{2}}} \ \mathrm{in} \ \mathcal {F}_j. \end{aligned}$$
(5)

Let \(\omega =\omega (x)\in (\mathcal {F}_j[u]/\langle u^s\rangle )^\times \). By Lemma 2.2(ii), \(\omega (x)\) has a unique u-adic expansion: \(\omega (x)=\sum _{i=0}^{s-1}u^ia_i(x), \ a_0(x)\ne 0\), where \(a_0(x),a_1(x),\ldots ,a_{s-1}(x)\in \mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle }.\)

As \(\mathrm{gcd}(x, f_j(x))=1\), Condition (3) for \(\omega =\omega (x)\in (\mathcal {F}_j[u]/\langle u^s\rangle )^\times \) is transformed to \(x^{\frac{d_j}{2}}\omega (x)+x^{-\frac{d_j}{2}}\omega (x^{-1})\equiv 0 \ (\mathrm{mod} \ f_j(x))\) by Lemma 3.2(i). Let’s write it down specifically: \(\sum _{i=0}^{s-1}u^i\left( x^{\frac{d_j}{2}}a_i(x)\right) +\sum _{i=0}^{s-1}u^i\left( x^{-\frac{d_j}{2}}a_i(x^{-1})\right) \equiv 0 \ (\mathrm{mod} \ f_j(x)).\) This is equivalent to the following congruence relations

$$\begin{aligned} x^{\frac{d_j}{2}}a_i(x)+x^{-\frac{d_j}{2}}a_i(x^{-1})\equiv 0 \ (\mathrm{mod} \ f_j(x)), \ i=0,1,\ldots ,s-1. \end{aligned}$$
(6)

For each \(0\le i\le s-1\), let \(\xi _i(x)=x^{\frac{d_j}{2}}a_i(x)\in \mathcal {F}_j\). Then

$$\begin{aligned} a_i(x)=x^{-\frac{d_j}{2}}\xi _i(x)\in \mathcal {F}_j. \end{aligned}$$
(7)

For any \(b\in \mathbb {F}_{2^m}\), by \(b^{2^m}=b\) we have \(b^{2^{\frac{d_j}{2}m}}=b^{(2^m)^{\frac{d_j}{2}}}=b\) in \(\mathbb {F}_{2^m}\subset \mathcal {F}_j\). Then by \(x^{-1}=x^{2^{\frac{d_j}{2}m}}\) and \(\xi _i(x)=x^{\frac{d_j}{2}}a_i(x)\in \mathcal {F}_j\), it follows that

$$\begin{aligned} x^{-\frac{d_j}{2}}a_i(x^{-1})=\xi _i(x^{-1})=\xi _i(x)^{2^{\frac{d_j}{2}m}}. \end{aligned}$$

Therefore, Eq. (6) is equivalent to

$$\begin{aligned} \xi _i(x)\left( \xi _i(x)^{2^{\frac{d_j}{2}m}-1}-1\right) =\xi _i(x)+(\xi _i(x))^{2^{\frac{d_j}{2}m}}=0 \ \mathrm{in} \ \mathcal {F}_j, \ i=0,1,\ldots , s-1. \end{aligned}$$

From the latter condition, we deduce that \(\xi _i(x)=0\) when \(s\ge 2\) or \(\xi _i(x)\in \mathcal {F}_j\) satisfying \(\xi _i(x)^{2^{\frac{d_j}{2}m}-1}=1\) for all s.

Since \(\varrho _j(x)\) is a primitive element of \(\mathcal {F}_j\), the multiplicative order of \(\varrho _j(x)\) is \(2^{d_jm}-1=(2^{\frac{d_j}{2}m}+1)(2^{\frac{d_j}{2}m}-1)\). This implies that \(\varrho _j(x)^{2^{\frac{d_j}{2}m}+1}\) is a primitive \((2^{\frac{d_j}{2}m}-1)\)th root of unity. Hence \(\xi _i(x)^{2^{\frac{d_j}{2}m}-1}=1\) if and only if

$$\begin{aligned} \xi _i(x)=\left( \varrho _j(x)^{2^{\frac{d_j}{2}m}+1}\right) ^l=\varrho _j(x)^{l(2^{\frac{d_j}{2}m}+1)}, \ 0\le l\le 2^{\frac{d_j}{2}m}-2. \end{aligned}$$

Therefore, the conclusion for \(\varTheta _{j,s}\) follows from Eq. (7) immediately. Moreover, we have \(|\varTheta _{j,s}|=|\varTheta _{j,1}|\prod _{i=2}^{s}(|\varTheta _{j,1}|+1)=(2^{\frac{d_j}{2}m}-1)2^{(s-1)\frac{d_j}{2}m}\) for all \(s=1,2,\ldots , k-1\). \(\square \)

Now is the time to give an explicit formula to count the number of all distinct self-dual cyclic codes over the ring R of length 2n.

Corollary 3.4

Let \(\mathcal {N}_S(2^m,k,n)\) be the number of all distinct self-dual cyclic codes over the ring R of length 2n. Then

$$\begin{aligned} \mathcal {N}_S(2^m,k,n)= & {} \left( \sum _{s=0}^{\frac{k}{2}}2^{ms}\right) \left( \prod _{j=2}^{\lambda }\sum _{s=0}^{\frac{k}{2}}2^{\frac{d_j}{2}ms}\right) \left( \prod _{j=\lambda +1}^{\lambda +\epsilon }N_{(2^m,d_j,k)}\right) , \ \mathrm{when} \ 2\mid k;\\ \mathcal {N}_S(2^m,k,n)= & {} \left( \sum _{s=0}^{\frac{k-1}{2}}2^{ms}\right) \left( \prod _{j=2}^{\lambda }\sum _{s=0}^{\frac{k-1}{2}}2^{\frac{d_j}{2}ms}\right) \left( \prod _{j=\lambda +1}^{\lambda +\epsilon }N_{(2^m,d_j,k)}\right) , \ \mathrm{when} \ 2\not \mid k. \end{aligned}$$

Proof

Let k be even and \(1\le j\le \lambda \). Then the number of ideals \(C_j\) listed in (\(\dag \)) of Theorem 3.1(i) is equal to

$$\begin{aligned} N_j= & {} 2+\sum _{t=0}^{\frac{k}{2}-1}|\varTheta _{j,\frac{k}{2}-t}|+\sum _{i=\frac{k}{2}+1}^{k-1}|\varTheta _{j,k-i}|+k-1-\frac{k}{2} +\sum _{i=\frac{k}{2}+1}^{k-1}\sum _{t=1}^{k-1-i}|\varTheta _{j,k-i-t}|\\= & {} 1+\frac{k}{2}+\frac{k}{2}|\varTheta _{j,1}|+\left( \frac{k}{2}-1\right) |\varTheta _{j,2}|+\left( \frac{k}{2}-2\right) |\varTheta _{j,3}|+2|\varTheta _{j,\frac{k}{2}-1}| +|\varTheta _{j,\frac{k}{2}}|\\= & {} 1+\frac{k}{2}+\sum _{s=1}^{\frac{k}{2}}\left( \frac{k}{2}-s+1\right) |\varTheta _{j,s}|. \end{aligned}$$

By Theorem 3.3 (i) and (ii) respectively, we know \(|\varTheta _{1,s}|=(2^m-1)2^{(s-1)m}\) and \(|\varTheta _{j,s}|=(2^{\frac{d_j}{2}m}-1)2^{(s-1)\frac{d_j}{2}m}\) when \(2\le j\le \lambda \). Now, we set \(q_1=2^m\) and denote \(q_j=2^{\frac{d_j}{2}m}\) when \(2\le j\le \lambda \), in the following. Then we have \(|\varTheta _{j,s}|=q_j^{s}-q_j^{s-1}\) for all integers j, \(1\le j\le \lambda \). From this, we obtain

$$\begin{aligned} N_j= & {} 1+\frac{k}{2}+\frac{k}{2}(q_j-1)+\left( \frac{k}{2}-1\right) (q_j^2-q_j)+\left( \frac{k}{2}-2\right) (q_j^3-q_j^2)\\&+\left( \frac{k}{2}-3\right) (q_j^4-q_j^3)+\cdots +2\left( q_j^{\frac{k}{2}-1}-q_j^{\frac{k}{2}-2}\right) +\left( q_j^{\frac{k}{2}}-q_j^{\frac{k}{2}-1}\right) \\= & {} \sum _{s=0}^{\frac{k}{2}}q_j^{s}. \end{aligned}$$

Therefore, \(\mathcal {N}_S(2^m,k,n)=N_1(\prod _{j=2}^\lambda N_j)(\prod _{j=\lambda +1}^{\lambda +\epsilon }N_{(2^m,d_j,k)})\) by Theorem 3.1.

The conclusion for any odd integer k, \(k\ge 3\), can by proved similarly. Here, we omit it. \(\square \)

4 Self-dual 2-quasi-cyclic codes of length 4n over \(\mathbb {F}_{2^m}\) derived from self-dual cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\)

In this section, We focus on self-dual cyclic codes of length 2n over \(R=\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) \((u^2=0)\), where n is odd. By Lemma 2.3, Corollary 2.5, Theorem 3.1, Theorem 3.3 and Corollary 3.4, we obtain the following conclusion.

Corollary 4.1

The number of self-dual cyclic codes of length 2n over the ring \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) \((u^2=0)\) is \((1+2^m)\cdot \prod _{j=2}^\lambda (1+2^{\frac{d_j}{2}m})\cdot \prod _{j=\lambda +1}^{\lambda +\epsilon }(5+2^{d_jm}).\) Precisely, all these codes are given by

$$\begin{aligned} \mathcal{C}=\left( \oplus _{j=1}^\lambda \varepsilon _j(x)C_j\right) \oplus \left( \oplus _{j=\lambda +1}^{\lambda +\epsilon }(\varepsilon _{j}(x)C_{j}\oplus \varepsilon _{j+\epsilon }(x)C_{j+\epsilon })\right) , \end{aligned}$$

where \(C_j\) is an ideal of \(\mathcal{K}_j+u\mathcal{K}_j\) \((u^2=0)\) listed as follows:

  1. (i)

    \(C_1\) is one of the following \(1+2^m\) ideals:

    \(\langle u\rangle \), \(\langle x-1\rangle \), \(\langle u+(x-1)\omega \rangle \) where \(\omega \in \mathbb {F}_{2^m}\) and \(\omega \ne 0\).

  2. (ii)

    Let \(2\le j\le \lambda \), and \(\varrho _j(x)\) is a primitive element of the finite field \(\mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle }\). Then \(C_j\) is one of the following \(1+2^{\frac{d_j}{2}m}\) ideals:

    \(\langle u\rangle \), \(\langle f_j(x)\rangle \);

    \(\langle u+f_j(x)\omega (x)\rangle \), where \(\omega (x)\in \varTheta _{j,1}\) and

    $$\begin{aligned} \varTheta _{j,1}=\left\{ x^{-\frac{d_j}{2}}\varrho _j(x)^{l(2^{\frac{d_j}{2}m}+1)} \ (\mathrm{mod} \ f_j(x)) \ \mid l=0,1,\ldots ,2^{\frac{d_j}{2}m}-2\right\} . \end{aligned}$$
  3. (iii)

    Let \(\lambda +1\le j\le \lambda +\epsilon \). Then the pair \((C_j,C_{j+\epsilon })\) of ideals is one of the following \(5+2^{d_jm}\) cases in the following table:

    \(\mathcal {L}\)

    \(C_j\) (mod \(f_j(x)^2\))

    \(|C_j|\)

    \(C_{j+\epsilon }\) (mod \(f_{j+\epsilon }(x)^2\))

    3

    \(\bullet \) \(\langle u^i\rangle \)\((i=0,1,2)\)

    \(4^{(2-i)d_jm}\)

    \(\diamond \) \(\langle u^{2-i}\rangle \)

    2

    \(\bullet \) \(\langle u^sf_j(x)\rangle \) (\(s=0,1\))

    \(2^{(2-s)d_jm}\)

    \(\diamond \) \(\langle u^{2-s},f_{j+\epsilon }(x)\rangle \)

    \(2^{d_jm}-1\)

    \(\bullet \) \(\langle u+f_j(x)\omega \rangle \)

    \(4^{d_jm}\)

    \(\diamond \) \(\langle u+f_{j+\epsilon }(x)\omega ^{\prime }\rangle \)

    1

    \(\bullet \) \(\langle u,f_j(x)\rangle \)

    \(2^{3d_jm}\)

    \(\diamond \) \(\langle uf_{j+\epsilon }(x)\rangle \)

    where \(\mathcal {L}\) is the number of pairs \((C_j,C_{j+\epsilon })\) in the same row,

    • \(\omega =\omega (x)\in \mathcal {F}_j =\{\sum _{i=0}^{d_j-1}a_ix^i\mid a_0,a_1,\ldots ,a_{d_j-1}\in \mathbb {F}_{2^m}\}\) and \(\omega \ne 0\),

    • \(\omega ^{\prime }=\delta _jx^{-d_j}\omega (x^{-1})\) \((\mathrm{mod} \ f_{j+\epsilon }(x))\).

Remark For the cases of \(k=3,4,5\), we list all distinct self-dual cyclic codes of length 2n over the ring \(\frac{\mathbb {F}_{2^m}[u]}{\langle u^k\rangle }\) in Appendix of this paper.

Now, let’s consider how to calculate the number of self-dual cyclic codes of length 2n over the ring \(R=\mathbb {F}_{2^m}+u \mathbb {F}_{2^m}\) directly from the odd positive integer n. Let \(J_1,J_2,\ldots ,J_r\) be all the distinct \(2^m\)-cyclotomic cosets modulo n corresponding to the factorization \(x^n-1=f_1(x)f_2(x) \ldots f_r(x)\), where \(f_1(x)=x-1, f_2(x),\ldots , f_r(x)\) are distinct monic irreducible polynomials in \(\mathbb {F}_{2^m}[x]\). Then we have \(r=\lambda +2\epsilon \) and

  • \(J_1=\{0\}\), the set \(J_j\) satisfies \(J_j=-J_j \pmod {n}\) and \(|J_j|=d_j\) for all \(j=2,\ldots ,\lambda \);

  • \(J_{\lambda +l+\epsilon }=-J_{\lambda +l} \pmod {n}\) and \(|J_{\lambda +l}|=|J_{\lambda +l+\epsilon }|=d_{\lambda +l}\), for all \(l=1,\ldots ,\epsilon \).

From this and by Corollary 4.1, we deduce that the number of self-dual cyclic codes over R of length 2n is

$$\begin{aligned} (1+2^m)\cdot \prod _{j=2}^\lambda (1+2^{\frac{|J_j|}{2}m})\cdot \prod _{j=\lambda +1}^{\lambda +\epsilon }(5+2^{|J_j|m}). \end{aligned}$$

As an example, we list the number \(\mathcal {N}\) of self-dual cyclic codes over \(\mathbb {F}_2+u\mathbb {F}_2\) of length 2n, where n is odd and \(6 \le 2n \le 98\), in the following table:

2n

\(\mathcal {N}\)

2n

\(\mathcal {N}\)

6

\(9=3(1+2)\)

54

\(41553=3(1+2)(1+2^3)(1+2^9)\)

10

\(15=3(1+2^2)\)

58

\(49155=3(1+2^{14})\)

14

\(39=3(5+2^3)\)

62

\(151959=3(5+2^5)^3\)

18

\(81=3(1+2)(1+2^3)\)

66

\(323433=3(1+2)(1+2^5)^3\)

22

\(99=3(1+2^5)\)

70

\(799695=3(1+2^2)(5+2^3)(5+2^{12})\)

26

\(195=3(1+2^6)\)

74

\(786435=3(1+2^{18})\)

30

\(945=3(1+2)(1+2^2)(5+2^4)\)

78

\(2399085=3(1+2)(1+2^6)(5+2^{12})\)

34

\(867=3(1+2^4)^2\)

82

\(3151875=3(1+2^{10})^2\)

38

\(1539=3(1+2^9)\)

86

\(6440067=3(1+2^7)^3\)

42

\(8073=3(1+2)(5+2^3)(5+2^6)\)

90

34879005

46

\(6159=3(5+2^{11})\)

94

\(25165839=3(5+2^{23})\)

50

\(15375=3(1+2^2)(1+2^{10})\)

98

\(81789123=3(5+2^3)(5+2^{21})\)

where \(34879005=3(1+2)(1+2^2)(1+2^3)(5+2^4)(5+2^{12})\).

Then we consider how to construct self-dual 2-quasi-cyclic codes of length 4n over \(\mathbb {F}_{2^m}\) from self-dual cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\).

Let \(\alpha =a+bu\in R\) where \(a,b\in \mathbb {F}_{2^m}\). As in [4], we define \(\phi (\alpha )=(b,a+b)\) and define the Lee weight of \(\alpha \) by \(\mathrm{w}_L(\alpha )=\mathrm{w}_H(b,a+b)\), where \(\mathrm{w}_H(b,a+b)\) is the Hamming weight of the vector \((b,a+b)\in \mathbb {F}_{2^m}^2\). Then \(\phi \) is an isomorphism of \(\mathbb {F}_{2^m}\)-linear spaces from R onto \(\mathbb {F}_{2^m}^2\), and can be extended to an isomorphism of \(\mathbb {F}_{2^m}\)-linear spaces from \(\frac{R[x]}{\langle x^{2n}-1\rangle }\) onto \(\mathbb {F}_{2^m}^{4n}\) by the rule:

$$\begin{aligned} \phi (\xi )=(b_0,b_1,\ldots ,b_{2n-1},a_0+b_0,a_1+b_1,\ldots ,a_{2n-1}+b_{2n-1}), \end{aligned}$$
(8)

for all \(\xi =\sum _{i=0}^{2n-1}\alpha _ix^i\in \frac{R[x]}{\langle x^{2n}-1\rangle }\), where \(\alpha _i=a_i+b_iu\) with \(a_i,b_i\in \mathbb {F}_{2^m}\) and \(i=0,1,\ldots ,2n-1\).

The following conclusion can be derived from [4, Corollary 14].

Lemma 4.2

Using the notation above, let \(\mathcal {C}\) be an ideal of the ring \(\frac{R[x]}{\langle x^{2n}-1\rangle }\) and set \(\phi (\mathcal {C})=\{\phi (\xi )\mid \xi \in \mathcal {C}\}\subseteq \mathbb {F}_{2^m}^{4n}\). Then

  1. (i)

    \(\phi (\mathcal {C})\) is a 2-quasi-cyclic code over \(\mathbb {F}_{2^m}\) of length 4n, i.e.,

    $$\begin{aligned} (b_{2n-1},b_0,b_1,\ldots ,b_{2n-2},c_{2n-1},c_0,c_1,\ldots ,c_{2n-2})\in \phi (\mathcal {C}) \end{aligned}$$

    for all \((b_0,b_1,\ldots ,b_{2n-2},b_{2n-1},c_0,c_1,\ldots ,c_{2n-2},c_{2n-1})\in \phi (\mathcal {C})\).

  2. (ii)

    The Hamming weight distribution of \(\phi (\mathcal {C})\) is exactly the same as the Lee weight distribution of \(\mathcal {C}\).

  3. (iii)

    \(\phi (\mathcal {C})\) is a self-dual code over \(\mathbb {F}_{2^m}\) of length 4n if \(\mathcal {C}\) is a self-dual code over R of length 2n.

By Corollary 4.1, we can get a class of self-dual 2-quasi-cyclic codes over \(\mathbb {F}_{2^m}\) of length 4n from the class of self-dual cyclic code over R of length 2n and the Gray map \(\phi \) defined by Eq. (8). In the following, we consider how to give an efficient encoder for each self-dual 2-quasi-cyclic code \(\phi (\mathcal {C})\) of length 4n over \(\mathbb {F}_{2^m}\) derived from a self-dual cyclic code \(\mathcal {C}\) of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\). We denote by \(A^{\mathrm{tr}}\) the transpose of a matrix A in this paper.

To simplify the symbol, in the following we identify each polynomial \(a(x)=a_0+a_1x+\cdots +a_{2n-1}x^{2n-1}\in \frac{\mathbb {F}_{2^m}[x]}{\langle x^{2n}-1\rangle }\) with the vector \((a_0,a_1,\ldots ,a_{2n-1})\in \mathbb {F}_{2^m}^{2n}\). Moreover, for any integer \(1\le s\le n-1\) we denote:

$$\begin{aligned}{}[a(x)]_s=\left( \begin{array}{c}a(x)\\ xa(x)\\ \ldots \\ x^{s-1}a(x)\end{array}\right) =\left( \begin{array}{ccccc}a_0 &{} a_1 &{}\ldots &{} a_{2n-2} &{} a_{2n-1}\\ a_{2n-1} &{} a_0 &{}\ldots &{} a_{2n-3} &{} a_{2n-2}\\ \ldots &{}\ldots &{}\ldots &{}\ldots &{}\ldots \\ a_{2n-s+1} &{} a_{2n-s+2} &{} \ldots &{} a_{2n-s-1} &{} a_{2n-s}\end{array}\right) \end{aligned}$$
(9)

which is a matrix over \(\mathbb {F}_{2^m}\) of size \(s\times 2n\).

Theorem 4.3

Using the notation above, every self-dual 2-quasi-cyclic code \(\phi (\mathcal {C})\) of length 4n over \(\mathbb {F}_{2^m}\) derived from a self-dual cyclic code \(\mathcal {C}\) of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) has an \(\mathbb {F}_{2^m}\)-generator matrix given by: \(G=\left( \begin{array}{c}G_1 \\ G_2 \\ \ldots \\ G_{\lambda +\epsilon }\end{array}\right) \) in which for each integer j, \(1\le j\le r\), \(G_j\) is a matrix over \(\mathbb {F}_{2^m}\) listed in the following:

  1. (i)

    \(G_1\) is one of the following \(1+2^m\) matrices with size \(2\times 4n\):

    \(\left( \begin{array}{cc} \varepsilon _1(x) &{} \varepsilon _1(x)\\ (x-1)\varepsilon _1(x) &{} (x-1)\varepsilon _1(x)\end{array}\right) \), \(\left( \begin{array}{cc} 0 &{} (x-1)\varepsilon _1(x) \\ (x-1)\varepsilon _1(x) &{} (x-1)\varepsilon _1(x)\end{array}\right) \),

    \(\left( \begin{array}{cc} \varepsilon _1(x) &{} \varepsilon _1(x)+(x-1)\varepsilon _1(x)\omega \\ (x-1)\varepsilon _1(x) &{} (x-1)\varepsilon _1(x)\end{array}\right) \) where \(\omega \in \mathbb {F}_{2^m}\) and \(\omega \ne 0\).

  2. (ii)

    Let \(2\le j\le \lambda \). Then \(G_j\) is one of the following \(1+2^{\frac{d_j}{2}m}\) matrices with size \(2d_j\times 4n\):

    \(\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} {[}\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} {[}f_j(x)\varepsilon _j(x)]_{d_j} \end{array}\right) \), \(\left( \begin{array}{cc} 0 &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) \),

    \(\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} {[}(1+f_j(x)\omega (x))\varepsilon _j(x)]_{d_j} \\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} {[}f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) \) where

    $$\begin{aligned} \omega (x)=x^{-\frac{d_j}{2}}\varrho _j(x)^{l(2^{\frac{d_j}{2}m}+1)} \ (\mathrm{mod} \ f_j(x)), \ l=0,1,\ldots ,2^{\frac{d_j}{2}m}-2. \end{aligned}$$
  3. (iii)

    Let \(\lambda +1\le j\le \lambda +\epsilon \). Then \(G_j\) is one of the following \(5+2^{d_jm}\) matrices with size \(4d_j\times 4n\):

    $$\begin{aligned}&\left( \begin{array}{cc} 0 &{} [\varepsilon _j(x)]_{d_j}\\ 0 &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ {[}\varepsilon _j(x)]_{d_j} &{} [\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) ,\\&\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} [\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ \hline {[}\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) ;\\&\left( \begin{array}{cc} 0 &{} [\varepsilon _{j+\epsilon }(x)]_{d_j}\\ 0 &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} \\ {[}\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) ;\\&\left( \begin{array}{cc} 0 &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\\ \hline 0 &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) ,\\&\left( \begin{array}{cc} [f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ \hline [\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\\ 0 &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} \end{array}\right) ;\\&\left( \begin{array}{cc} {[}\varepsilon _j(x)]_{d_j} &{} [\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ 0 &{} [f_j(x)\varepsilon _j(x)]_{d_j}\\ \hline {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} \end{array}\right) ;\\&\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} [(1+f_j(x)\omega (x))\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ \hline [\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [(1+f_{j+\epsilon }(x)\omega ^\prime (x))\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) \\ \end{aligned}$$

where \(\omega ^\prime (x)=\delta _jx^{-d_j}w(x^{-1})\) \((\mathrm{mod} \ f_{j+\epsilon }(x))\), \(\omega (x)\in \mathcal {F}_j\) and \(\omega (x)\ne 0\).

Proof

Let \(\mathcal {C}\) be a self-dual cyclic code over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) of length 2n. By Corollary 4.1, \(\mathcal {C}\) has a unique direct decomposition:

$$\begin{aligned} \mathcal {C}=\mathcal {C}_1\oplus \mathcal {C}_2\oplus \ldots \oplus \mathcal {C}_{\lambda +\epsilon }, \end{aligned}$$
(10)

where \(\mathcal {C}_j=\varepsilon _j(x)C_j=\{\varepsilon _j(x)\xi \mid \xi \in C_j\}\) \((\mathrm{mod} \ x^{2n}-1)\) for all \(j=1,\ldots ,\lambda \), \(\mathcal {C}_j=\varepsilon _j(x)C_j\oplus \varepsilon _{j+\epsilon }(x)C_{j+\epsilon }\) \((\mathrm{mod} \ x^{2n}-1)\) for all \(j=\lambda +1,\ldots , \lambda +\epsilon \), and

  • \(C_1\) is given by Corollary 4.1(i);

  • \(C_j\) is given by Corollary 4.1(ii) for all \(j=2,\ldots \lambda \);

  • \((C_j, C_{j+\epsilon })\) is given by Corollary 4.1(iii) for all \(j=\lambda +1,\ldots , \lambda +\epsilon \).

Now, let \(\alpha (x)\) be an arbitrary element in the ring \(\mathcal {K}_j+u\mathcal {K}_j\) (\(u^2=0\)) where \(\mathcal {K}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)^2\rangle }\). Then there is a unique tuple \((\alpha _0,\alpha _1,\alpha _2,\alpha _3)\) of elements in \(\mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle } \subset \mathcal {K}_j\) such that

$$\begin{aligned} \alpha =\left( \alpha _0+\alpha _1f_j(x)\right) +u\left( \alpha _2+\alpha _3f_j(x)\right) . \end{aligned}$$
(11)

Since \(\{1,x,\ldots ,x^{d_j-1}\}\) is an \(\mathbb {F}_{2^m}\)-basis of \(\mathcal {F}_j\), for each integer \(0\le t\le 3\) there is a unique row matrix \(\underline{a}_t=(a_{t,0},a_{t,1},\ldots ,a_{t,d_j-1})\in \mathbb {F}_{2^m}^{d_j}\) such that

$$\begin{aligned} \alpha _t=a_{t,0}+a_{t,1}x+\cdots +a_{t,d_j-1}x^{d_j-1}=\underline{a}_t X_{d_j}, \end{aligned}$$
(12)

where \(X_{d_j}=(1,x,\ldots ,x^{d_j-1})^{\mathrm{tr}}\).

Let \(D_j=D_{j;(g(x),h(x))}=\langle g(x)+uh(x)\rangle \) be an ideal of the ring \(\mathcal {K}_j+u\mathcal {K}_j\) generated by \(g(x)+uh(x)\), where \(g(x),h(x)\in \mathcal {K}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)^2\rangle }\), and denote \(\mathcal {D}_j=\varepsilon _j(x)D_j\). Then \(\mathcal {D}_j\) is an \(\mathbb {F}_{2^m}\)-subspace of \(\mathcal {A}+u\mathcal {A}\), where \(\mathcal {A}=\frac{\mathbb {F}_{2^m}[x]}{\langle x^{2n}-1\rangle }\), and the \(\mathbb {F}_{2^m}\)-dimension of \(\mathcal {D}_j\) is \(\mathrm{log}_{2^m}|D_j|\). Hence \(\mathrm{dim}_{\mathbb {F}_{2^m}}(\mathcal {D}_j)=l\) if \(|D_j|=2^{ml}\). Now, we claim that a generator matrix of the \(\mathbb {F}_{2^m}\)-subspace \(\phi (\mathcal {D}_j)\) is the following:

$$\begin{aligned} G_{j;(g(x),h(x))}=\left( \begin{array}{cc} {[}h(x)\varepsilon _j(x)]_{d_j} &{} [(g(x)+h(x))\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)h(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)(g(x)+h(x))\varepsilon _j(x)]_{d_j} \\ {[}g(x)\varepsilon _j(x)]_{d_j} &{} [g(x)\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)g(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)g(x)\varepsilon _j(x)]_{d_j}\end{array}\right) . \end{aligned}$$
(13)

In fact, by Eq. (11), each element \(\xi \) of \(D_j\) is of the form:

$$\begin{aligned} \xi= & {} \alpha (g(x)+uh(x))\\= & {} (\alpha _0+\alpha _1f_j(x))g(x)+u\left( (\alpha _0+\alpha _1f_j(x))h(x)+(\alpha _2+\alpha _3f_j(x))g(x)\right) . \end{aligned}$$

Then by Eq. (8) in Sect. 4 and Eq. (12), we have

$$\begin{aligned} \phi (\varepsilon _j(x)\xi )= & {} \left( (\alpha _0+\alpha _1f_j(x))h(x)\varepsilon _j(x)+(\alpha _2+\alpha _3f_j(x))g(x)\varepsilon _j(x),\right. \\&\left. (\alpha _0+\alpha _1f_j(x))(g(x)+h(x))\varepsilon _j(x)+(\alpha _2+\alpha _3f_j(x))g(x)\varepsilon _j(x)\right) \\= & {} (\alpha _0,\alpha _1,\alpha _2,\alpha _3) \left( \begin{array}{cc} h(x)\varepsilon _j(x) &{} (g(x)+h(x))\varepsilon _j(x)\\ f_j(x)h(x)\varepsilon _j(x) &{} f_j(x)(g(x)+h(x))\varepsilon _j(x) \\ g(x)\varepsilon _j(x) &{} g(x)\varepsilon _j(x)\\ f_j(x)g(x)\varepsilon _j(x) &{} f_j(x)g(x)\varepsilon _j(x)\end{array}\right) \\= & {} (\underline{a}_0,\underline{a}_1,\underline{a}_2,\underline{a}_3)G_{j;(g(x),h(x))}. \end{aligned}$$

From this, we deduce that the \(\mathbb {F}_{2^m}\)-subspace \(\phi (\mathcal {D}_j)\) is generated by the row vectors of \(G_{j;(g(x),h(x))}\). Hence \(G_{j;(g(x),h(x))}\) is a generator matrix over \(\mathbb {F}_{2^m}\).

\(\diamondsuit \) Let consider Case (ii) first. Let \(2\le j\le \lambda \) and \(C_j\) be an ideal of \(\mathcal {K}_j+u\mathcal {K}_j\) given by Corollary 4.1(ii). Then we have one of the following three cases:

(ii-1) \(C_j=\langle u\rangle =D_{j; (0,1)}\). In this case, we have \(g(x)=0\) and \(h(x)=1\). Then by Eq. (13), \(G_{j;(0,1)}\) is a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\). By deleting the bottom zero row vectors of \(G_{j;(0,1)}\), a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\) is given by \(G_j=\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} [\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) .\) Then by \(|C_j|=2^{md_j}\), we have \(\mathrm{dim}_{\mathbb {F}_{2^m}}(\phi (\mathcal {C}_j))=2d_j\).

(ii-2) \(C_j=\langle f_j(x)\rangle =D_{j;(f_j(x),0)}\). In this case, we have \(g(x)=f_j(x)\) and \(h(x)=0\). Then by Eq. (13), \(G_{j;(f_j(x),0)}\) is a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\). As \(f_j(x)^2=0\) in \(\mathcal {K}_j\), both the second row and the 4th row of the block matrix \(G_{j;(f_j(x),0)}\) are zero vector. By deleting the two zero row vectors of \(G_{j;(f_j(x),0)}\), a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\) is given by \(G_j=\left( \begin{array}{cc} 0 &{} [f_j(x)\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) .\) Then by \(|C_j|=2^{md_j}\), we have \(\mathrm{dim}_{\mathbb {F}_{2^m}}(\phi (\mathcal {C}_j))=2d_j\).

(ii-3) \(C_j=\langle u+f_j(x)\omega (x)\rangle =D_{j;(f_j(x)\omega (x),1)}\). In this case, we have \(g(x)=f_j(x)\omega (x)\) and \(h(x)=1\). Then by Eq. (13), \(G_{j;(f_j(x)\omega (x),1)}\) is a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\). As \(f_j(x)^2=0\) in \(\mathcal {K}_j\), we have \(f_j(x)g(x)=0\) and \(f_j(x)(g(x)+h(x))=f_j(x)\). Hence

$$\begin{aligned} G_{j;(f_j(x)\omega (x),1)}=\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} [(f_j(x)\omega (x)+1)\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ {[}f_j(x)\omega (x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\omega (x)\varepsilon _j(x)]_{d_j}\\ 0 &{} 0 \end{array}\right) . \end{aligned}$$

Since \(\omega (x)\) is a polynomial in \(\mathbb {F}_{2^m}[x]\) of degree less than \(d_j-1\) by \(\omega (x)\in \mathcal {F}_j^\times \), we see that every row vector of the matrix \([f_j(x)\omega (x)\varepsilon _j(x)]_{d_j}\) is an \(\mathbb {F}_{2^m}\)-linear combination of the row vectors of \([f_j(x)\varepsilon _j(x)]_{d_j}\). Hence a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\) is given by \(G_j=\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} {[}(1+f_j(x)\omega (x))\varepsilon _j(x)]_{d_j} \\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) \).

\(\diamondsuit \) The conclusions in Case (i) can be proved similarly as that in Case (ii) above.

\(\diamondsuit \) We consider Case (iii). Let \(\mathcal {C}_j=\varepsilon _j(x)C_j\oplus \varepsilon _{j+\epsilon }(x)C_{j+\epsilon }\), where \(\lambda +1\le j\le \lambda +\epsilon \) and the pair \((C_j,C_{j+\epsilon })\) of ideals is given by the table in Corollary 4.1. Then we have \(\phi (\mathcal {C}_j)=\phi (\varepsilon _j(x)C_j)\oplus \phi (\varepsilon _{j+\epsilon }(x)C_{j+\epsilon })\) and \(\mathrm{dim}_{\mathbb {F}_{2^m}}(\phi (\mathcal {C}_j)=4d_j\). Therefore, a generator matrix of \(\phi (\mathcal {C}_j)\) over \(\mathbb {F}_{2^m}\) is given by \(G_j=\left( \begin{array}{c} A\\ \hline B\end{array}\right) \), where A and B are generator matrices of \(\phi (\varepsilon _j(x)C_j)\) and \(\phi (\varepsilon _{j+\epsilon }(x)C_{j+\epsilon })\) over \(\mathbb {F}_{2^m}\) respectively. Using Eq. (13), matrices A and B can be determined similarly as that in Case (ii) above. Here are some cases:

\(\triangleright \) Let \(C_j=\langle 1\rangle =D_{j;(1,0)}\) and \(C_{j+\epsilon }=\{0\}\). Then \(B=0\), and by Eq. (13) we have \(A=\left( \begin{array}{cc} 0 &{} [\varepsilon _j(x)]_{d_j}\\ 0 &{} [f_j(x)\varepsilon _j(x)]_{d_j} \\ {[}\varepsilon _j(x)]_{d_j} &{} [\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) .\)

\(\triangleright \) Let \(C_j=\langle u\rangle =D_{j;(0,1)}\) and \(C_{j+\epsilon }=\langle u\rangle =D_{j+\epsilon ;(0,1)}\). Then by the proof of (ii) and \(d_{j+\epsilon }=d_j\), we deduce that \(A=\left( \begin{array}{cc} [\varepsilon _j(x)]_{d_j} &{} [\varepsilon _j(x)]_{d_j}\\ {[}f_j(x)\varepsilon _j(x)]_{d_j} &{} [f_j(x)\varepsilon _j(x)]_{d_j}\end{array}\right) \) and \(B=\left( \begin{array}{cc} [\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) .\)

\(\triangleright \) Let \(C_j=\langle uf_j(x)\rangle =D_{j;(0,f_j(x))}\) and \(C_{j+\epsilon }=\langle u, f_{j+\epsilon }(x)\rangle =\langle u\rangle +\langle f_{j+\epsilon }(x)\rangle =D_{j+\epsilon ;(0,1)}+D_{j+\epsilon ;(f_{j+\epsilon }(x),0)}\). Then by the proof of (ii), we see that \(B_1=\left( \begin{array}{cc} [\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) \) is a generator matrix of \(\phi (\varepsilon _{j+\epsilon }(x)D_{j+\epsilon ;(0,1)})\) and \(B_2=\left( \begin{array}{cc} 0 &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) \) is a generator matrix of \(\phi (\varepsilon _{j+\epsilon }(x)D_{j+\epsilon ;(f_{j+\epsilon }(x),0)})\). Since the last row of the block matrices \(B_1\) and \(B_2\) are the same, a generator matrix of \(\phi (\varepsilon _j(x)C_{j+\epsilon })\) is given by \(B=\left( \begin{array}{cc} {[}\varepsilon _{j+\epsilon }(x)]_{d_j} &{} {[}\varepsilon _{j+\epsilon }(x)]_{d_j}\\ {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j} &{} {[}f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\\ 0 &{} [f_{j+\epsilon }(x)\varepsilon _{j+\epsilon }(x)]_{d_j}\end{array}\right) \).

From Eq. (13), we deduce that \(A=\left( [f_j(x)\varepsilon _j(x)]_{d_j},[f_j(x)\varepsilon _j(x)]_{d_j}\right) \) is a a generator matrix of \(\phi (\varepsilon _j(x)C_{j})=\phi (\varepsilon _j(x)D_{j;(0,f_j(x))})\), since \(u^2=0\) and \(f_j(x)^2=0\).

\(\triangleright \) The other conclusion in Case (iii) can be proved similarly. Here, we omit these details. \(\square \)

As the end of this section, we list all distinct self-dual cyclic codes \(\mathcal {C}\) over \(\mathbb {F}_2+u\mathbb {F}_2\) of length 30. We have \(x^{15}-1=f_1(x)f_2(x)f_3(x)f_4(x)f_5(x)\), where

  • \(f_1(x)=x-1\), \(f_2(x)=x^2+x+1\), \(f_3(x)=x^4+x^3+x^2+x+1\),

  • \(f_4(x)=x^4+x+1\) and \(f_5(x)=x^4+x^3+1\)

are irreducible polynomials in \(\mathbb {F}_2[x]\) satisfying \(\widetilde{f}_j(x)=f_j(x)\) for all \(j=1,2,3\), and \(\widetilde{f}_4(x)=f_5(x)\) with \(\delta _4=1\). Hence \(r=5\), \(\lambda =3\), \(\epsilon =1\), \(d_1=1\), \(d_2=2\) and \(d_3=d_4=d_5=4\).

Using the notation in Sect. 2, we have

$$\begin{aligned} \varepsilon _1(x)=&{x}^{28}+{x}^{26}+{x}^{24}+{x}^{22}+{x}^{20}+{x}^{18} +{x}^{16}+{x}^{14}+{x}^{12}+{x}^{10}+{x}^{8}+{x}^{6}\\&+{x}^{4}+x^{2}+1, \\ \varepsilon _2(x)=&{x}^{28}+{x}^{26}+{x}^{22}+{x}^{20}+{x}^{16}+{x} ^{14}+{x}^{10}+{x}^{8}+{x}^{4}+x^{2}, \\ \varepsilon _3(x)=&{x}^{28}+{x}^{26}+{x}^{24}+{x}^{22}+{x}^{18}+{x}^{16}+{x}^{14}+{x}^{12}+{x }^{8}+{x}^{6}+{x}^{4}+x^{2}, \\ \varepsilon _4(x)=&{x}^{24}+{x}^{18}+{x}^{16}+{x}^{12}+{x}^{8}+ {x}^{6}+{x}^{4}+x^{2}, \\ \varepsilon _5(x)=&{x}^{28}+{x}^{26}+{x}^{24}+{x}^{22}+{x}^{18}+{x}^{14}+{x}^{12}+{x}^{6}. \end{aligned}$$

Obviously, x is a primitive element of the finite field \(\mathcal {F}_2=\frac{\mathbb {F}_2[x]}{\langle f_2(x)\rangle }\) and

$$\begin{aligned} \varTheta _{2,1}=\{x^{-\frac{2}{2}}x^{l(2^{\frac{2}{2}}+1)}\mid l=2^{\frac{2}{2}}-2=0\}=\{x+1\} \ (\mathrm{mod} \ f_2(x)); \end{aligned}$$

\(x+1\) is a primitive element of the finite field \(\mathcal {F}_3=\frac{\mathbb {F}_2[x]}{\langle f_3(x)\rangle }\) and

$$\begin{aligned} \varTheta _{3,1}= & {} \{x^{-\frac{4}{2}}(x+1)^{l(2^{\frac{4}{2}}+1)}\mid l=0,1,2^{\frac{4}{2}}-2=2\} \ (\mathrm{mod} \ f_3(x))\\= & {} \{x^3,x^3+x+1,x+1\}. \end{aligned}$$

Moreover, for any \(\omega (x)=a+bx+cx^2+dx^3\in \mathcal {F}_3=\frac{\mathbb {F}_2[x]}{\langle f_4(x)\rangle }\) satisfying \((a,b,c,d) \in \mathbb {F}_2^4\setminus \{(0,0,0,0)\}\), we have

$$\begin{aligned} \omega ^\prime (x)= & {} \delta _4x^{-4}\omega (x^{-1})=x^{11}\omega (x^{14}) \ (\mathrm{mod} \ f_5(x)=x^4+x^3+1)\\= & {} (a+b+d)x^3+(a+c+d)x^2+(b+d)x+a+c. \end{aligned}$$

Let \(\mathcal {K}_j=\frac{\mathbb {F}_2[x]}{\langle f_j(x)^2\rangle }\) for all \(j=1,2,3,4,5\). By Corollary 4.1, all 945 self-dual cyclic codes over \(\mathbb {F}_2+u\mathbb {F}_2\) of length 30 are given by

$$\begin{aligned} \mathcal {C}=\mathcal {C}_1\oplus \mathcal {C}_2\oplus \mathcal {C}_3\oplus \mathcal {C}_4, \end{aligned}$$

where

  • \(\mathcal {C}_1=\varepsilon _1(x)C_1\), \(C_1\) is one of the following 3 ideals of the ring \(\mathcal {K}_1+u \mathcal {K}_1\): \(\langle u\rangle \), \(\langle (x-1)\rangle \), \(\langle u+(x-1)\rangle \).

  • \(\mathcal {C}_2=\varepsilon _2(x)C_2\), \(C_2\) is one of the following 3 ideals of the ring \(\mathcal {K}_2+u \mathcal {K}_2\): \(\langle u\rangle \), \(\langle (x^2+x+1)\rangle \), \(\langle u+(x^2+x+1)\cdot (x+1)\rangle \).

  • \(\mathcal {C}_3=\varepsilon _3(x)C_3\), \(C_3\) is one of the following 5 ideals of the ring \(\mathcal {K}_3+u \mathcal {K}_3\): \(\langle u\rangle \), \(\langle (x^4+x^3+x^2+x+1)\rangle \), \(\langle u+(x^4+x^3+x^2+x+1)\cdot \omega (x)\rangle \) with \(\omega (x)\in \varTheta _{3,1}\).

  • \(\mathcal {C}_4=\varepsilon _4(x)C_4\oplus \varepsilon _5(x)C_5\), \(C_j\) is an ideal of the ring \(\mathcal {K}_j+u \mathcal {K}_j\) for \(j=4,5\), and the pair \((C_4,C_5)\) is one of the following 21 cases:

    • \(C_4=\langle u^i\rangle \) and \(C_5=\langle u^{2-i}\rangle \), where \(i=0,1,2\);

    • \(C_4=\langle f_4(x)\rangle \) and \(C_5=\langle f_{5}(x)\rangle \);

    • \(C_4=\langle uf_4(x)\rangle \) and \(C_5=\langle u, f_{5}(x)\rangle \);

    • \(C_4=\langle u,f_4(x)\rangle \) and \(C_5=\langle uf_{5}(x)\rangle \);

    • \(C_4=\langle u+f_4(x)(a+bx+cx^2+dx^3)\rangle \) and \(C_5=\langle u+f_{5}(x)((a+b+d)x^3+(a+c+d)x^2+(b+d)x+a+c)\rangle \), where \((a,b,c,d) \in \mathbb {F}_2^4\setminus \{(0,0,0,0)\}\).

Finally, by Lemma 4.2 and Theorem 4.3 we obtain 945 binary self-dual 2-quasi-cyclic codes \(\phi (\mathcal {C})\) of length 60. For example, among these codes we have the following 48 self-dual and 2-quasi-cyclic codes \(\phi (\mathcal {C})\) with basic parameters [60, 30, 8], which are determined by:

  • \(C_2\) is \(\langle u\rangle \) or \(\langle u+(x^2+x+1)\cdot (x+1)\rangle \).

  • The pair \((C_4,C_5)\) is \((\langle u^i\rangle ,\langle u^{2-i}\rangle )\), for \(i=0,2\).

  • The pair \((C_1,C_3)\) is one of the following 12 cases:

    • \(\triangleright \) \(C_1=\langle u\rangle \), and \(C_3\) is one of the following 4 ideals:

      \(\langle (x^4+x^3+x^2+x+1)\rangle \), \(\langle u+(x^4+x^3+x^2+x+1)\cdot \omega (x)\rangle \) with \(\omega (x)\in \varTheta _{3,1}\);

    • \(\triangleright \) \(C_1=\langle (x-1)\rangle \), and \(C_3\) is one of the following 4 ideals:

      \(\langle u\rangle \), \(\langle u+(x^4+x^3+x^2+x+1)\cdot \omega (x)\rangle \) with \(\omega (x)\in \varTheta _{3,1}\);

    • \(\triangleright \) \(C_1=\langle u+(x-1)\rangle \), and \(C_3\) is one of the following 4 ideals:

      \(\langle u\rangle \), \(\langle (x^4+x^3+x^2+x+1)\rangle \), \(\langle u+(x^4+x^3+x^2+x+1)\cdot \omega (x)\rangle \) with \(\omega (x)\in \{x^3,x^3+x+1\}\).

5 The hull of every cyclic code with length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\)

In this section, we determine the hull of each cyclic code over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) with length 2n where n is odd.

As a generalization for the hull of a linear code over finite field, for any linear code \(\mathcal {C}\) of length 2n over the ring \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\), the hull of \(\mathcal {C}\) is defined by \(\mathrm{Hull}(\mathcal {C})=\mathcal {C}\cap \mathcal {C}^{\bot }.\)

Let \(\phi \) be the isomorphism of \(\mathbb {F}_{2^m}\)-linear spaces from \(\frac{(\mathbb {F}_{2^m}+u \mathbb {F}_{2^m})[x]}{\langle x^{2n}-1\rangle }\) onto \(\mathbb {F}_{2^m}^{4n}\) defined by Eq. (8) in Sect. 4. Then from properties for ideals in a ring and Lemma 4.2, we deduce the following conclusion immediately.

Proposition 5.1

Let \(\mathcal {C}\) be a cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) and \(\phi (\mathcal {C})\) be defined as in Lemma 4.2. Then

  1. (i)

    \(\mathrm{Hull}(\mathcal {C})\) is a cyclic code over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) of length 2n.

  2. (ii)

    \(\mathrm{Hull}(\phi (\mathcal {C}))=\phi (\mathcal {C})\cap (\phi (\mathcal {C}))^{\bot }\) is a 2-quasi-cyclic code over \(\mathbb {F}_{2^m}\) of length 4n, and \(\mathrm{Hull}(\phi (\mathcal {C}))=\phi (\mathrm{Hull}(\mathcal {C}))\).

  3. (iii)

    The Hamming weight distribution of \(\mathrm{Hull}(\phi (\mathcal {C}))\) is exactly the same as the Lee weight distribution of \(\mathrm{Hull}(\mathcal {C})\).

It is known that a class of entanglement-assisted quantum error correcting codes (EAQECCs) can be constructed from classical codes and their basic parameters are related to the hulls of classical codes ([11, Corollary 3.1]):

Let \(\mathcal {C}\) be a classical \([n, k, d]_q\) linear code and \(\mathcal {C}^{\bot }\) its Euclidean dual with parameters \([n, n-k, d^{\bot }]_q\). Then there exist \([[n, k-\mathrm{dim}(\mathrm{Hull}(\mathcal {C})), d; n-k- \mathrm{dim}(\mathrm{Hull}(\mathcal {C}))]]_q\) and \([[n, n-k-\mathrm{dim}(\mathrm{Hull}(\mathcal {C})), d^{\bot }; k-\mathrm{dim}(\mathrm{Hull}(\mathcal {C}))]]_q\) EAQECCs. Further, if C is MDS then the two EAQECCs are also MDS.

Using the notation in the beginning of Sect. 3, we denote

$$\begin{aligned} \varrho (j)=\left\{ \begin{array}{ll} j, &{} \mathrm{} \ \mathrm{when} \ 1\le j\le \lambda ; \\ j+\epsilon , &{} \mathrm{} \ \mathrm{when} \ \lambda +1\le j\le \lambda +\epsilon ; \\ j-\epsilon , &{} \mathrm{} \ \mathrm{when} \ \lambda +\epsilon +1\le j\le \lambda +2\epsilon . \end{array}\right. \end{aligned}$$

The dual code for every cyclic code of length 2n over \(\frac{\mathbb {F}_{2^m}[u]}{\langle u^k\rangle }\), where \(k\ge 2\), has been determined by [7, Theorem 3.5]. In particular, we have the following:

Lemma 5.2

Let \(\mathcal {C}\) be a cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) \((u^2=0)\) with canonical form decomposition \(\mathcal {C}=\bigoplus _{j=1}^r\varepsilon _j(x)C_j\), where \(C_j\) is an ideal of \(\mathcal {K}_j+u\mathcal {K}_j\). Then

  • \(|\mathcal {C}|=\prod _{j=1}^r|C_j|\) and \(\mathrm{dim}_{\mathbb {F}_{2^m}}(\mathcal {C})=\sum _{j=1}^r\mathrm{dim}_{\mathbb {F}_{2^m}}(C_j)\).

  • The dual code of \(\mathcal {C}\) is given by \(\mathcal {C}^{\bot }=\bigoplus _{j=1}^r\varepsilon _j(x)D_j,\) where \(D_j\) is an ideal of \(\mathcal {K}_j+u\mathcal {K}_j\) determined by the following table for all \(j=1,\ldots ,r\):

    \(\mathcal {L}\)

    \(C_j\) (mod \(f_j(x)^2\))

    \(|C_j|\)

    \(\kappa _j\)

    \(D_{\varrho (j)}\) (mod \(f_{\varrho (j)}(x)^2\))

    1

    \(\bullet \) \(\langle 0\rangle \)

    1

    0

    \(\diamond \) \(\langle 1\rangle \)

    1

    \(\bullet \) \(\langle 1\rangle \)

    \(4^{2d_jm}\)

    \(4d_j\)

    \(\diamond \) \(\langle 0\rangle \)

    1

    \(\bullet \) \(\langle u\rangle \)

    \(4^{d_jm}\)

    \(2d_j\)

    \(\diamond \) \(\langle u\rangle \)

    1

    \(\bullet \) \(\langle f_j(x)\rangle \)

    \(4^{d_jm}\)

    \(2d_j\)

    \(\diamond \) \(\langle f_{\varrho (j)}(x)\rangle \)

    1

    \(\bullet \) \(\langle uf_j(x)\rangle \)

    \(2^{d_jm}\)

    \(d_j\)

    \(\diamond \) \(\langle u,f_{\varrho (j)}(x)\rangle \)

    \(2^{d_jm}-1\)

    \(\bullet \) \(\langle u+f_j(x)\omega \rangle \)

    \(4^{d_jm}\)

    \(2d_j\)

    \(\diamond \) \(\langle u+f_{\varrho (j)}(x)\omega ^{\prime }\rangle \)

    1

    \(\bullet \) \(\langle u,f_j(x)\rangle \)

    \(2^{3d_jm}\)

    \(3d_j\)

    \(\diamond \) \(\langle uf_{\varrho (j)}(x)\rangle \)

    where \(\kappa _j=\mathrm{dim}_{\mathbb {F}_{2^m}}(C_j)\), \(\mathcal {L}\) is the number of pairs \((C_j,D_{\varrho (j)})\) in the same row, and

    • \(\omega =\omega (x)\in \mathcal {F}_j =\{\sum _{i=0}^{d_j-1}a_ix^i\mid a_0,a_1,\ldots ,a_{d_j-1}\in \mathbb {F}_{2^m}\}\) and \(\omega \ne 0\),

    • \(\omega ^{\prime }=\delta _jx^{-d_j}\omega (x^{-1})\) \((\mathrm{mod} \ f_{\varrho (j)}(x))\).

For each integer j, \(1\le j\le r\), let \(\mathcal {F}_j\setminus \{0\}=\{\omega _1,\ldots ,\omega _{2^{d_jm}-1}\}\). Then the ideal lattice of the ring \(\mathcal {K}_j+u\mathcal {K}_j\) is the following figure.

Then we have the following conclusion.

Theorem 5.3

Let \(\mathcal {C}\) be a cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) with canonical form decomposition \(\mathcal {C}=\bigoplus _{j=1}^r\varepsilon _j(x)C_j\), where \(C_j\) is an ideal of \(\mathcal {K}_j+u\mathcal {K}_j\). Then the Hull of \(\mathcal {C}\) is given by

$$\begin{aligned} \mathrm{Hull}(\mathcal {C})=\bigoplus _{j=1}^r\varepsilon _j(x)H_j, \end{aligned}$$

where \(H_j\) is an ideal of \(\mathcal {K}_j+u\mathcal {K}_j\) determined by the following conditions for all \(j=1,\ldots ,r\):

  1. (i)

    Let \(j=1\). Then

    $$\begin{aligned} H_1=\left\{ \begin{array}{ll} \langle 0\rangle , &{} \mathrm{if} \ C_1=\langle 0\rangle \ \mathrm{or} \ \langle 1\rangle ; \\ \langle u(x-1)\rangle , &{} \mathrm{if} \ C_1=\langle u(x-1)\rangle \ \mathrm{or} \ \langle u, x-1\rangle ; \\ \langle x-1\rangle , &{} \mathrm{if} \ C_1=\langle x-1\rangle ; \\ \langle u+(x-1)a\rangle , &{} \mathrm{if} \ C_1=\langle u+(x-1)a\rangle \ \mathrm{where} \ a\in \mathbb {F}_{2^m}. \end{array}\right. \end{aligned}$$
  2. (ii)

    Let \(2\le j\le \lambda \). Then

    $$\begin{aligned} H_j=\left\{ \begin{array}{ll} \langle 0\rangle , &{} \mathrm{if} \ C_j=\langle 0\rangle \ \mathrm{or} \ \langle 1\rangle ; \\ \langle uf_j(x)\rangle , &{} \mathrm{if} \ C_j=\langle uf_j(x)\rangle \ \mathrm{or} \ \langle u, f_j(x)\rangle ; \\ \langle f_j(x)\rangle , &{} \mathrm{if} \ C_j=\langle f_j(x)\rangle ; \\ \langle u+f_j(x)\omega \rangle , &{} \mathrm{if} \ C_j=\langle u+f_j(x)\omega \rangle \ \mathrm{where} \ \omega \in \{0\}\cup \varTheta _{j,1}; \\ \langle uf_j(x)\rangle , &{} \mathrm{if} \ C_j=\langle u+f_j(x)\omega \rangle \ \mathrm{where} \ 0\ne \omega \in \mathcal {F}_j\setminus \varTheta _{j,1}. \end{array}\right. \end{aligned}$$
  3. (iii)

    Let \(\lambda +1\le j\le \lambda +\epsilon \). Then the pair \((H_j,H_{j+\epsilon })\) of ideals is given by one of the following six cases, where \(\mathcal {S}_{j+\epsilon }\) is the set of all \(5+2^{d_jm}\) ideals in the ring \(\mathcal {K}_{j+\epsilon }+u\mathcal {K}_{j+\epsilon }\) listed by Lemma 5.2.

    • 1. Let \(C_j=\langle 0\rangle \). Then

      • \(\diamond \) \(H_j=\langle 0\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\), for every \(C_{j+\epsilon }\in \mathcal {S}_{j+\epsilon }\).

    • 2. Let \(C_j=\langle uf_j(x)\rangle \). Then

      • \(\diamond \) \(H_j=\langle 0\rangle \) and \(H_{j+\epsilon }=\langle u, f_{j+\epsilon }(x)\rangle \), if \(C_{j+\epsilon }=\langle 1\rangle \);

      • \(\diamond \) \(H_j=\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\), if \(C_{j+\epsilon }\in \mathcal {S}_{j+\epsilon }\) and \(C_{j+\epsilon }\ne \langle 1\rangle \).

    • 3. Let \(C_j=\langle f_j(x)\rangle \). Then

      • \(\diamond \) \(H_j=\langle f_j(x)\rangle \) and \(H_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \), if \(C_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \);

      • \(\diamond \) \(H_j=\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \), if \(C_{j+\epsilon }=\langle u, f_{j+\epsilon }(x)\rangle \);

      • \(\diamond \) \(H_j=\langle 0\rangle \) and \(H_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \), if \(C_{j+\epsilon }=\langle 1\rangle \);

      • \(\diamond \) \(H_j=\langle f_j(x)\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\), if \(C_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \), \(\langle 0\rangle \);

      • \(\diamond \) \(H_j=\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \),

        if \(C_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega ^{\prime }\rangle \) for any \(\omega ^{\prime }\in \mathcal {F}_{j+\epsilon }\).

    • 4. Let \(C_j=\langle u+f_j(x)\omega _0\rangle \), where \(\omega _0=\omega _0(x)\in \mathcal {F}_j\). Denote \(\omega _0^\prime =\omega _0^\prime (x)=\delta _jx^{-d_j}\omega _0(x^{-1})\) \((\mathrm{mod} \ f_{j+\epsilon }(x))\) in the following. Especially, we have \(\omega _0^\prime =0\) when \(\omega _0=0\). Then

      • \(\diamond \) \(H_j=\langle u+f_j(x)\omega _0\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\),

        if \(C_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \), \(\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle \), \(\langle 0\rangle \);

      • \(\diamond \) \(H_j=\langle uf_{j}(x)\rangle \) and \(H_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle \), if \(C_{j+\epsilon }=\langle u, f_{j+\epsilon }(x)\rangle \);

      • \(\diamond \) \(H_j=\langle 0\rangle \) and \(H_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle \), if \(C_{j+\epsilon }=\langle 1\rangle \);

      • \(\diamond \) \(H_j=\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \), if \(C_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \), \(\langle u+f_{j+\epsilon }(x)\omega ^\prime \rangle \) where \(\omega ^\prime \in \mathcal {F}_{j+\epsilon }\setminus \{\omega _0^\prime \}\).

    • 5. Let \(C_j=\langle u, f_j(x)\rangle \). Then

      • \(\diamond \) \(H_j=\langle u, f_j(x)\rangle \) and \(H_{j+\epsilon }=\langle 0\rangle \), if \(C_{j+\epsilon }=\langle 0\rangle \);

      • \(\diamond \) \(H_j=D_{\varrho (j+\epsilon )}\) and \(H_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \), if \(C_{j+\epsilon }\in \mathcal {S}_{j+\epsilon }\setminus \{\langle 0\rangle \}\).

    • 6. Let \(C_j=\langle 1\rangle \). Then

      • \(\diamond \) \(H_j=D_{\varrho (j+\epsilon )}\) and \(H_{j+\epsilon }=\langle 0\rangle \), for every \(C_{j+\epsilon }\in \mathcal {S}_{j+\epsilon }\).

Moreover, we have that \(\mathrm{dim}_{\mathbb {F}_{2^m}}(\mathrm{Hull}(\mathcal {C})) =\sum _{j=1}^r\mathrm{dim}_{\mathbb {F}_{2^m}}(H_j)\).

Remark (\(\dag \)) In Cases 5 and 6 of (iii) above, by Lemma 5.2 and \(\varrho (j+\epsilon )=j\) the ideal \(D_{\varrho (j+\epsilon )}\) in the ring \(\mathcal {K}_j+u\mathcal {K}_j\) is determined by the following table:

\(\mathcal {L}\)

\(C_{j+\epsilon }\) (mod \(f_{j+\epsilon }(x)^2\))

\(|C_{j+\epsilon }|\)

\(D_{\varrho (j)}=D_j\) (mod \(f_{j}(x)^2\))

1

\(\bullet \) \(\langle 0\rangle \)

1

\(\diamond \) \(\langle 1\rangle \)

1

\(\bullet \) \(\langle 1\rangle \)

\(4^{2d_jm}\)

\(\diamond \) \(\langle 0\rangle \)

1

\(\bullet \) \(\langle u\rangle \)

\(4^{d_jm}\)

\(\diamond \) \(\langle u\rangle \)

1

\(\bullet \) \(\langle f_{j+\epsilon }(x)\rangle \)

\(4^{d_jm}\)

\(\diamond \) \(\langle f_{j}(x)\rangle \)

1

\(\bullet \) \(\langle uf_{j+\epsilon }(x)\rangle \)

\(2^{d_jm}\)

\(\diamond \) \(\langle u,f_{j}(x)\rangle \)

\(2^{d_jm}-1\)

\(\bullet \) \(\langle u+f_{j+\epsilon }(x)\omega \rangle \)

\(4^{d_jm}\)

\(\diamond \) \(\langle u+f_{j}(x)\omega ^{\prime }\rangle \)

1

\(\bullet \) \(\langle u,f_{j+\epsilon }(x)\rangle \)

\(2^{3d_jm}\)

\(\diamond \) \(\langle uf_{j}(x)\rangle \)

where \(\mathcal {L}\) is the number of pairs \((C_{j+\epsilon },D_j)\) in the same row, \(d_j=d_{j+\epsilon }\) and

$$\begin{aligned} \omega= & {} \omega (x)\in \mathcal {F}_{j+\epsilon } =\{\sum _{i=0}^{d_j-1}a_ix^i\mid a_0,a_1,\ldots ,a_{d_j-1}\in \mathbb {F}_{2^m}\}\; and\; \omega \ne 0,\\ \omega ^{\prime }= & {} \delta _{j+\epsilon }x^{-d_j}\omega (x^{-1}) (\mathrm{mod} \ f_{j}(x)). \end{aligned}$$

(\(\ddag \)) The \(\mathbb {F}_{2^m}\)-dimension \(\mathrm{dim}_{\mathbb {F}_{2^m}}(H_j)\) can be obtained easily through the table in Lemma 5.2.

Proof

Let \(\mathcal {C}^{\bot }=\bigoplus _{j=1}^r\varepsilon _j(x)D_j\), where \(D_j\) is an ideal of the ring \(\mathcal {K}_j+u\mathcal {K}_j\) determined by Lemma 5.2 for \(j=1,\ldots ,r\). Since \(\varepsilon _j(x)^2=\varepsilon _j(x)\) and \(\varepsilon _j(x)\varepsilon _l(x)=0\) in the ring \(\mathcal {A}\) for all \(j\ne l\) and \(j,l=1,\ldots ,r\), by Lemma 2.1 it follows that \(\mathrm{Hull}(\mathcal {C})=\mathcal {C}\cap \mathcal {C}^{\bot }=\bigoplus _{j=1}^r\varepsilon _j(x)H_j\) where \(H_j=C_j\cap D_j\) for all \(j=1,\ldots ,r\). Then by Lemma 5.2 we have the following three cases.

Case i: \(j=1\). In this case, we have \(\varrho (1)=1\), \(f_1(x)=x-1\) and \(\mathcal {F}_1=\mathbb {F}_{2^m}\). By Lemma 3.2, we know that \(\delta _1=1\), \(d_1=1\) and \(\omega ^\prime =\omega \) for any \(\omega \in \mathbb {F}_{2^m}\setminus \{0\}\). Then we have one of the following four subcases:

  1. (i-1)

    Let \(C_1=\langle 0\rangle \) or \(\langle 1\rangle \). Then \(H_1=C_1\cap D_1=\langle 0\rangle \).

  2. (i-2)

    Let \(C_1=\langle u(x-1)\rangle \) or \(\langle u,x-1\rangle \). Then \(H_1=C_1\cap D_1=\langle u(x-1)\rangle \).

  3. (i-3)

    Let \(C_1=\langle x-1\rangle \). Then \(H_1=C_1\cap D_1=\langle x-1\rangle \).

  4. (i-4)

    Let \(C_1=\langle u+(x-1)a\rangle \), where \(a\in \mathcal {F}_{2^m}\). Then \(D_1=\langle u+(x-1)a\rangle \) by Lemma 5.2. This implies \(H_1=C_1\cap D_1=\langle u+(x-1)a\rangle \).

Case ii: \(2\le j\le \lambda \). In this case, we have \(\varrho (j)=j\), \(\mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle }\). By Lemma 3.2, we know that \(\delta _j=1\). Then we have one of the following five subcases:

  1. (ii-1)

    Let \(C_j=\langle 0\rangle \) or \(\langle 1\rangle \). Then \(H_j=C_j\cap D_j=\langle 0\rangle \).

  2. (ii-2)

    Let \(C_j=\langle uf_j(x)\rangle \) or \(\langle u,f_j(x)\rangle \). Then \(H_j=C_j\cap D_j=\langle uf_j(x)\rangle \).

  3. (ii-3)

    Let \(C_j=\langle f_j(x)\rangle \). Then \(H_j=C_j\cap D_j=\langle f_j(x)\rangle \).

  4. (ii-4)

    Let \(C_j=\langle u+f_j(x)\omega \rangle \), where \(\omega =\omega (x)\in \{0\}\cup \varTheta _{j,1}\). For any \(\omega \in \varTheta _{j,1}\), by the definition of the set \(\varTheta _{j,1}\) before Theorem 3.1, we have that \(\omega =\delta _jx^{-d_j}\widehat{\omega }=\omega ^{\prime }\) in the finite field \(\mathcal {F}_j\). This implies \(D_j=\langle u+f_j(x)\omega \rangle \) for all \(\omega \in \{0\}\cup \varTheta _{j,1}\). Hence \(H_j=C_j\cap D_j=\langle u+f_j(x)\omega \rangle \).

  5. (ii-5)

    Let \(C_j=\langle u+f_j(x)\omega \rangle \), where \(\omega \ne 0\) and \(\omega \in \mathcal {F}_j\setminus \varTheta _{j,1}\). By Lemma 5.2, we have that \(D_j=\langle u+f_j(x)\omega ^\prime \rangle \) and \(\omega \ne \omega ^\prime \). From this, we deduce that \(H_j=C_j\cap D_j=\langle uf_j(x)\rangle \).

Case iii: \(\lambda +1\le j\le \lambda +\epsilon \). In this case, we have \(\varrho (j)=j+\epsilon \), \(\varrho (j+\epsilon )=j\), \(\mathcal {F}_j=\frac{\mathbb {F}_{2^m}[x]}{\langle f_j(x)\rangle }\) and \(\mathcal {F}_{j+\epsilon }=\frac{\mathbb {F}_{2^m}[x]}{\langle f_{j+\epsilon }(x)\rangle }\). Then we have one of the following seven subcases:

(iii-1) \(C_j=\langle 0\rangle \). In this case, by Lemma 5.2 we have \(D_{j+\epsilon }=\langle 1\rangle \). This implies \(H_j=C_j\cap D_j=\langle 0\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\) for any ideal \(C_{j+\epsilon }\) of \(\mathcal {K}_{j+\epsilon }+u \mathcal {K}_{j+\epsilon }\) by Lemma 5.2.

(iii-2) \(C_j=\langle uf_j(x)\rangle \). In this case, we have \(D_{j+\epsilon }=\langle u, f_{j+\epsilon }(x)\rangle \). Then by Lemma 5.2 we have the following conclusions:

\(\triangleright \):

If \(C_{j+\epsilon }=\langle 1\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle 0\rangle \) by Lemma 5.2. Hence \(H_j=C_j\cap D_j=\langle 0\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=D_{j+\epsilon }=\langle u, f_{j+\epsilon }(x)\rangle \).

\(\triangleright \):

If \(C_{j+\epsilon }\ne \langle 1\rangle \), we have \(C_{j+\epsilon }\subseteq \langle u, f_{j+\epsilon }(x)\rangle \), and that \(D_j=D_{\varrho (j+\epsilon )}\supseteq \langle uf_j(x)\rangle \) by Lemma 5.2. Hence \(H_j=C_j\cap D_j=C_j=\langle uf_j(x)\rangle \), and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\) for any ideal \(C_{j+\epsilon }\) of \(\mathcal {K}_{j+\epsilon }+u \mathcal {K}_{j+\epsilon }\) satisfying \(C_{j+\epsilon }\ne \langle 1\rangle \).

(iii-3) \(C_j=\langle f_j(x)\rangle \). In this case, we have \(D_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \). Then by Lemma 5.2 we have the following conclusions:

\(\triangleright \):

If \(C_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \), \(\langle u, f_{j+\epsilon }(x)\rangle \) or \(\langle 1\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle f_{j}(x)\rangle \), \(\langle uf_{j}(x)\rangle \) or \(\langle 0\rangle \) respectively. Hence \(H_j=C_j\cap D_j=D_j\) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=D_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \).

\(\triangleright \):

If \(C_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \) or \(\langle 0\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle u, f_{j}(x)\rangle \) or \(\langle 1\rangle \) respectively. Hence \(H_j=C_j\cap D_j=C_j=\langle f_j(x) \rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\).

\(\triangleright \):

If \(C_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega ^\prime \rangle \) where \(\omega ^\prime = \omega ^\prime (x)\in \mathcal {F}_{j+\epsilon }\), then \(D_j=D_{\varrho (j+\epsilon )}=\langle u+f_{j}(x)\omega \rangle \) where \(\omega =\omega (x)\in \mathcal {F}_{j}\) satisfying

$$\begin{aligned} \omega ^\prime (x)=\delta _jx^{-d_j}\omega (x^{-1}) \ (\mathrm{mod} \ f_{j+\epsilon }(x)). \end{aligned}$$

Hence \(H_j=C_j\cap D_j=\langle f_j(x) \rangle \cap \langle u+f_{j}(x)\omega \rangle =\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega ^\prime \rangle \cap \langle f_{j+\epsilon }(x)\rangle =\langle uf_{j+\epsilon }(x)\rangle \).

(iii-4) \(C_j=\langle u\rangle \). In this case, we have \(D_{j+\epsilon }=\langle u\rangle \). Similar to the case (iii-3), by Lemma 5.2 we have the following conclusions:

\(\triangleright \):

If \(C_{j+\epsilon }=\langle u\rangle \), \(\langle u, f_{j+\epsilon }(x)\rangle \) or \(\langle 1\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle u\rangle \), \(\langle uf_{j}(x)\rangle \) or \(\langle 0\rangle \) respectively. Hence \(H_j=C_j\cap D_j=D_j\) and \(H_{j+\epsilon }=D_{j+\epsilon }=\langle u\rangle \).

\(\triangleright \):

If \(C_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \) or \(\langle 0\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle u, f_{j}(x)\rangle \) or \(\langle 1\rangle \) respectively. Hence \(H_j=C_j\cap D_j=C_j=\langle u \rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\).

\(\triangleright \):

If \(C_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle \) or \(\langle u+f_{j+\epsilon }(x)\omega ^\prime \rangle \) where \(\omega ^\prime = \omega ^\prime (x)\in \mathcal {F}_{j+\epsilon }\setminus \{0\}\), then \(D_j=D_{\varrho (j+\epsilon )}=\langle f_j(x)\rangle \) or \(\langle u+f_{j}(x)\omega \rangle \) where \(\omega =\omega (x)\in \mathcal {F}_{j}\setminus \{0\}\) satisfying \(\omega ^\prime (x)=\delta _jx^{-d_j}\omega (x^{-1}) \ (\mathrm{mod} \ f_{j+\epsilon }(x)).\) Hence \(H_j=C_j\cap D_j=\langle u \rangle \cap D_j=\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\cap \langle u\rangle =\langle uf_{j+\epsilon }(x)\rangle \).

(iii-5) \(C_j=\langle u+f_j(x)\omega _0\rangle \) where \(\omega _0=\omega _0(x)\in \mathcal {F}_j\setminus \{0\}\). In this case, we have \(D_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle \) where \(\omega _0^\prime \in \mathcal {F}_{j+\epsilon }\setminus \{0\}\) satisfying \(\omega _0^\prime =\omega _0^\prime (x)=\delta _jx^{-d_j}\omega _0(x^{-1})\) (mod \(f_{j+\epsilon }(x)\)). Then by Lemma 5.2 we have the following conclusions:

\(\triangleright \):

If \(C_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle \), \(\langle u, f_{j+\epsilon }(x)\rangle \) or \(\langle 1\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle u+f_j(x)\omega _0\rangle \), \(\langle uf_{j}(x)\rangle \) or \(\langle 0\rangle \) respectively. Hence \(H_j=C_j\cap D_j=D_j\) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon } =\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle \).

\(\triangleright \):

If \(C_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \) or \(\langle 0\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle u, f_{j}(x)\rangle \) or \(\langle 1\rangle \) respectively. Hence \(H_j=C_j=\langle u+f_j(x)\omega _0 \rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\).

\(\triangleright \):

If \(C_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle , \langle u\rangle \) or \(\langle u+f_{j+\epsilon }(x)\omega ^\prime \rangle \) where \(\omega ^\prime = \omega ^\prime (x)\in \mathcal {F}_{j+\epsilon }\setminus \{\omega _0^{\prime }\}\), then \(D_j=D_{\varrho (j+\epsilon )}=\langle f_j(x)\rangle , \langle u\rangle \) or \(\langle u+f_{j}(x)\omega \rangle \) where \(\omega =\omega (x)\in \mathcal {F}_{j}\setminus \{\omega _0\}\) satisfying \(\omega ^\prime (x)=\delta _jx^{-d_j}\omega (x^{-1}) \ (\mathrm{mod} \ f_{j+\epsilon }(x)).\) Hence \(H_j=C_j\cap D_j=\langle u+f_j(x)\omega _0 \rangle \cap D_j=\langle uf_j(x)\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }\cap \langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle =\langle uf_{j+\epsilon }(x)\rangle \).

(iii-6) \(C_j=\langle u, f_j(x)\rangle \). In this case, we have \(D_{j+\epsilon }=\langle u f_{j+\epsilon }(x)\rangle \). Then by Lemma 5.2 we have the following conclusions:

\(\triangleright \):

If \(C_{j+\epsilon }=\langle 0\rangle \), then \(D_j=D_{\varrho (j+\epsilon )}=\langle 1\rangle \) by Lemma 5.2. Hence \(H_j=C_j\cap D_j=C_j=\langle u, f_j(x)\rangle \) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon } =\langle 0\rangle \).

\(\triangleright \):

If \(C_{j+\epsilon }\ne \langle 0\rangle \), we have \(C_{j+\epsilon }\supseteq \langle uf_{j+\epsilon }(x)\rangle \), and that \(D_j=D_{\varrho (j+\epsilon )}\subseteq \langle u, f_j(x)\rangle \) by Lemma 5.2. Hence \(H_j=C_j\cap D_j=D_j\), and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=C_{j+\epsilon }=\langle uf_{j+\epsilon }(x)\rangle \) for any ideal \(C_{j+\epsilon }\) of \(\mathcal {K}_{j+\epsilon }+u \mathcal {K}_{j+\epsilon }\) satisfying \(C_{j+\epsilon }\ne \langle 0\rangle \).

(iii-7) \(C_j=\langle 1\rangle \). In this case, we have \(D_{j+\epsilon }=\langle 0\rangle \). This implies \(H_j=C_j\cap D_j=D_j=D_{\varrho (j+\epsilon )}\) and \(H_{j+\epsilon }=C_{j+\epsilon }\cap D_{j+\epsilon }=\langle 0\rangle \) for any ideal \(C_{j+\epsilon }\) of \(\mathcal {K}_{j+\epsilon }+u \mathcal {K}_{j+\epsilon }\) by Lemma 5.2.

When \(\omega _0=\omega _0(x)=0\), we have \(\omega _0^\prime =\omega _0^\prime (x)=\delta _jx^{-d_j}\omega _0(x^{-1})=0\) as well. Hence the Case (iii-4) and Case (iii-5) can be combined into one case where \(\omega _0\in \mathcal {F}_j\). \(\square \)

For any cyclic code \(\mathcal {C}\) of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\), it is clear that \(\mathcal {C}\) is self-orthogonal if and only if \(\mathcal {C}\subseteq \mathcal {C}^{\bot }\). The latter is equivalent to that \(\mathrm{Hull}(\mathcal {C})=\mathcal {C}\). From this and by Theorem 5.3, we deduce the following corollary immediately.

Corollary 5.4

Using the notation in Theorem 5.3, all distinct self-orthogonal cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) are given by

$$\begin{aligned} \mathcal {C}=\bigoplus _{j=1}^r\varepsilon _j(x)C_j \ (\mathrm{mod} \ x^{2n}-1), \end{aligned}$$

where \(C_j\) is an ideal of the ring \(\mathcal {K}_j+u\mathcal {K}_j\) listed as follows.

  1. (i)

    \(C_1\) is one of the following \(3+2^m\) ideals:

    $$\begin{aligned} \langle 0\rangle , \langle u(x-1)\rangle , \langle x-1\rangle , \langle u+(x-1)a\rangle \; where \;a\in \mathbb {F}_{2^m}. \end{aligned}$$
  2. (ii)

    Let \(2\le j\le \lambda \). Then \(C_j\) is one of the following \(3+2^{\frac{d_j}{2}m}\) ideals:

    $$\begin{aligned} \langle 0\rangle , \langle uf_j(x)\rangle , \langle f_j(x)\rangle , \langle u+f_j(x)\omega \rangle \; where\; \omega \in \{0\}\cup \varTheta _{j,1}. \end{aligned}$$
  3. (iii)

    Let \(\lambda +1\le j\le \lambda +\epsilon \). Then the pair \((C_j,C_{j+\epsilon })\) of ideals is given by one of the following five subcases:

    • \(\diamond \) \(5+2^{d_jm}\) pairs: \(\left\{ \begin{array}{l} C_j=\langle 0\rangle , \\ C_{j+\epsilon }\in \mathcal {S}_{j+\epsilon }.\end{array}\right. \)

    • \(\diamond \) \(4+2^{d_jm}\) pairs: \(\left\{ \begin{array}{l} C_j=\langle uf_j(x)\rangle , \\ C_{j+\epsilon }\in \mathcal {S}_{j+\epsilon } \ \mathrm{and} \ C_{j+\epsilon }\ne \langle 1\rangle .\end{array}\right. \)

    • \(\diamond \) 3 pairs: \(\left\{ \begin{array}{l} C_j=\langle f_j(x)\rangle , \\ C_{j+\epsilon }=\langle f_{j+\epsilon }(x)\rangle , \ \langle uf_{j+\epsilon }(x)\rangle , \ \langle 0\rangle .\end{array}\right. \)

    • \(\diamond \) \(3\cdot 2^{d_jm}\) pairs: \(\left\{ \begin{array}{l} C_j=\langle u+f_j(x)\omega _0\rangle , \\ C_{j+\epsilon }=\langle u+f_{j+\epsilon }(x)\omega _0^\prime \rangle , \ \langle uf_{j+\epsilon }(x)\rangle , \ \langle 0\rangle ;\end{array}\right. \) \(\forall \omega _0\in \mathcal {F}_j\).

    • \(\diamond \) 2 pairs: \(\left\{ \begin{array}{l} C_j=\langle u, f_j(x)\rangle , \ \langle 1\rangle \\ C_{j+\epsilon }=\langle 0\rangle .\end{array}\right. \)

Therefore, the number of self-orthogonal cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) is \((3+2^m)\cdot \prod _{j=2}^\lambda (3+2^{\frac{d_j}{2}m}) \cdot \prod _{j=\lambda +1}^{\lambda +\epsilon }(14+5\cdot 2^{d_jm}).\)

Now, we list the number \(\mathcal {NO}\) of self-orthogonal cyclic codes \(\mathcal {C}\) over \(\mathbb {F}_2+u\mathbb {F}_2\) of length 2n, where n is odd and \(6 \le 2n \le 98\), in the following table.

2n

\(\mathcal {NO}\)

2n

\(\mathcal {NO}\)

6

\(25=5(3+2)\)

54

\(141625=5(3+2)(3+2^3)(3+2^9)\)

10

\(45=5(3+2^2)\)

58

\(81935=5(3+2^{14})\)

14

\(270=5(14+5\cdot 2^3)\)

62

\(26340120=5(14+5\cdot 2^5)^3\)

18

\(275=5(3+2)(3+2^3)\)

66

\(982600=5(3+2)(3+2^5)^3\)

22

\(175=5(3+2^5)\)

70

38733660

26

\(335=5(3+2^6)\)

74

\(1310735=5(3+2^{18})\)

30

\(16450=25(3+2^2)(14+5\cdot 2^4)\)

78

\(34327450=25(3+2^6)(14+5\cdot 2^{12})\)

34

\(1805=5(3+2^4)^2\)

82

\(5273645=5(3+2^{10})^2\)

38

\(2575=5(3+2^9)\)

86

\(11240455=5(3+2^7)^3\)

42

\(450900=25(14+5\cdot 2^3)(14+5\cdot 2^6)\)

90

3708389300

46

\(51270=5(14+5\cdot 2^{11})\)

94

\(209715270=5(14+5\cdot 2^{23})\)

50

\(35945=5(3+2^2)(3+2^{10})\)

98

2831158980

where \(38733660=5(3+2^2)(14+5\cdot 2^3)(14+5\cdot 2^{12})\) and

$$\begin{aligned} 3708389300= & {} 5(3+2)(3+2^2)(3+2^3)(14+5\cdot 2^4)(14+5\cdot 2^{12}),\\ 2831158980= & {} 5(14+5\cdot 2^3)(14+5\cdot 2^{21}). \end{aligned}$$

Remark (i) Let \(\mathcal {C}\) be a cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\). Then \(\mathcal {C}\) is orthogonal self-contained if and only if \(\mathrm{Hull}(\mathcal {C})=\mathcal {C}^{\bot }\). All distinct orthogonal self-contained cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\) can be determined by Theorem 5.3 similar to the case of self-orthogonal cyclic codes. Furthermore, we can obtain orthogonal self-contained and 2-quasi-cyclic codes of length 4n over \(\mathbb {F}_{2^m}\) by Eq. (8) in Sect. 4. A class of EAQECCs has been constructed from orthogonal self-contained cyclic codes and LCD codes in literatures (see [11, Proposition 4.2] and [20], for example).

(ii) Let \(\phi \) be the isomorphism of \(\mathbb {F}_{2^m}\)-linear spaces from \(\frac{(\mathbb {F}_{2^m}+u \mathbb {F}_{2^m})[x]}{\langle x^{2n}-1\rangle }\) onto \(\mathbb {F}_{2^m}^{4n}\) defined by Eq. (8). By Proposition 5.1, we see that \(\phi (\mathcal {C})\) is a self-orthogonal 2-quasi-cyclic code of length 4n over the finite field \(\mathbb {F}_{2^m}\) for every self-orthogonal cyclic code \(\mathcal {C}\) over the ring \(\mathbb {F}_{2^m}+u \mathbb {F}_{2^m}\) of length 2n. In particular, The Hamming weight distribution of \(\phi (\mathcal {C})\) is the same as the Lee weight distribution of \(\mathcal {C}\) by Lemma 4.2(ii).

(iii) On the last line of the three tables in Pages 265, 272 and 274 of [7], the range \(0\le t< s< i\le k-1\) (resp. \(1\le t< s< i\le k-1\)) for the triple (tsi) of integers should be changed to \(0\le t< s< i\le k-2\) (resp. \(1\le t< s< i\le k-2\)). Because there is no triple (tsi) of integers satisfying all the conditions: \(i=k-1\), \(i+s\le k+t-1\) (i.e., \(s\le t\)) and \(t<s\).

6 Conclusions and further research

We have given an explicit representation for self-dual cyclic codes of length 2n over the ring \(R=\mathbb {F}_{2^m}[u]/\langle u^k\rangle =\mathbb {F}_{2^m} +u\mathbb {F}_{2^m}+\cdots +u^{k-1}\mathbb {F}_{2^m}\) (\(u^k=0\)) and a clear Mass formula to count the number of these codes, for any integer \(k\ge 2\) and positive odd integer n. Then, all self-dual 2-quasi-cyclic codes over finite field \(\mathbb {F}_{2^m}\) of length 4n derived from self-dual cyclic codes of length 2n over \(\mathbb {F}_{2^m} +u\mathbb {F}_{2^m}\) (\(u^2=0\)) are determined by providing their generator matrices precisely. Moreover, we determine the hull of each cyclic code of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\), and give an explicit representation and enumeration for self-orthogonal cyclic codes of length 2n over \(\mathbb {F}_{2^m}+u\mathbb {F}_{2^m}\).

Giving an explicit representation and enumeration for self-dual cyclic codes over R for arbitrary even length and considering the construction of EAQECCs from the class of self-orthogonal (resp. orthogonal self-contained) 2-quasi-cyclic codes of length 4n over \(\mathbb {F}_{2^m}\) derived from self-orthogonal (resp. orthogonal self-contained) cyclic codes of length 2n over \(\mathbb {F}_{2^m} +u\mathbb {F}_{2^m}\) are future topics of interest.