This is the accepted version of the journal article: Bhunia, Dipak Kumar; Fernández Córdoba, Cristina; Villanueva, M. «On recur- sive constructions of Z2Z4Z8-linear Hadamard codes». Advances in Mathematics of Communications, (November 2023). DOI 10.3934/amc.2023047 This version is available at https://ddd.uab.cat/record/285314 under the terms of the license ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA Abstract. The Z2 Z4 Z8 -additive codes are subgroups of Zα α2 2 × Z4 × 1 α3 Z8 . A Z2 Z4 Z8 -linear Hadamard code is a Hadamard code, which is the Gray map image of a Z2 Z4 Z8 -additive code. In this paper, we generalize some known results for Z2 Z4 -linear Hadamard codes to Z2 Z4 Z8 -linear Hadamard codes with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0. First, we give a recursive construction of Z2 Z4 Z8 -additive Hadamard codes of type (α1 , α2 , α3 ; t1 , t2 , t3 ) with t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1. It is known that each Z4 -linear Hadamard code is equivalent to a Z2 Z4 -linear Hadamard code with α1 ̸= 0 and α2 ̸= 0. Unlike Z2 Z4 -linear Hadamard codes, in general, this family of Z2 Z4 Z8 -linear Hadamard codes does not include the family of Z4 -linear or Z8 -linear Hadamard codes. We show that, for example, for length 211 , the constructed nonlinear Z2 Z4 Z8 -linear Hadamard codes are not equivalent to each other, nor to any Z2 Z4 -linear Hadamard, nor to any previously constructed Z2s -Hadamard code, with s ≥ 2. Finally, we also present other recursive constructions of Z2 Z4 Z8 - additive Hadamard codes having the same type, and we show that, after applying the Gray map, the codes obtained are equivalent to the previous ones. 1. Introduction Let Z2s be the ring of integers modulo 2s with s ≥ 1. The set of n-tuples over Z2s is denoted by Zn2s . In this paper, the elements of Zn2s are also called vectors. A code over Z2 of length n is a nonempty subset of Zn2 , and it is linear if it is a subspace of Zn2 . Similarly, a nonempty subset of Zn2s is a Z2s -additive code if it is a subgroup of Zn2s . A Z2 Z4 Z8 -additive code is a subgroup of Zα2 1 × Zα4 2 × Zα8 3 . Note that a Z2 Z4 Z8 -additive code is a linear code over Z2 when α2 = α3 = 0, a Z4 -additive or Z8 -additive code when α1 = α3 = 0 or α1 = α2 = 0, respectively, and a Z2 Z4 -additive code when α3 = 0. The order of a vector u ∈ Zn2s , denoted by o(u), is the smallest positive integer m such that mu = (0, . . . , 0). Also, the order of a vector 2020 Mathematics Subject Classification. 94B25, 94B60. Key words and phrases. Hadamard code, Gray map, Z2 Z4 Z8 -linear code. This work has been partially supported by the Spanish Ministerio de Ciencia e In- novación under grants PID2019-104664GB-I00, PID2022-137924NB-I00, and RED2022- 134306-T (AEI / 10.13039/501100011033); and by the Catalan AGAUR under scholarship 2020 FI SDUR 00475 and grant 2021 SGR 00643. The material in this paper was presented in part at the IEEE International Symposium on Information Theory (ISIT 2023), 25-30 June 2023 [8]. 1 2 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA u ∈ Zα2 1 × Zα4 2 × Zα8 3 , denoted by o(u), is the smallest positive integer m such that mu = (0, . . . , 0 | 0, . . . , 0 | 0, . . . , 0). The Hamming weight of a vector u ∈ Zn2 , denoted by wtH (u), is the number of nonzero coordinates of u. The Hamming distance of two vectors u, v ∈ Zn2 , denoted by dH (u, v), is the number of coordinates in which they differ. Note that dH (u, v) = wtH (u − v). The minimum distance of a code C over Z2 is d(C) = min{dH (u, v) : u, v ∈ C, u ̸= v}. In [19], a Gray map from Z4 to Z22 is defined as ϕ(0) = (0, 0), ϕ(1) = (0, 1), ϕ(2) = (1, 1) and ϕ(3) = (1, 0). There exist different generalizations of this s−1 Gray map, which go from Z2s to Z22 [14, 12, 15, 20, 24]. The one given in [20] can be defined in terms of the elements of a Hadamard code [24], and Carlet’s Gray mapP [14] is a particular case of the one given in [24] satisfying λi ϕ(2i ) = ϕ( λi 2i ) [16]. In this paper, we focus on Carlet’s Gray map P s−1 [14], from Z2s to Z22 , which is also a particular case of the one given in [33]. Specifically, (1) ϕs (u) = (us−1 , us−1 , . . . , us−1 ) + (u0 , . . . , us−2 )Ys−1 , where u ∈ Z2s ; [u0 , u1 , . . . , us−1 ]2 is the binary expansion of u, that is, u = s−1 i s−1 whose P i=0 ui 2 with ui ∈ {0, 1}; and Y is a matrix of size (s−1)×2 s−1 columns are all the vectors in Z2 . Without loss of generality, we assume that the columns of Ys−1 are ordered in ascending order by considering the elements of Zs−1 2 as the binary expansions of the elements of Z2s−1 . Note that ϕ1 is the identity map, and ϕ2 : Z4 −→ Z22 ϕ3 : Z8 −→ Z42 0 7→ (0, 0) 0 7→ (0, 0, 0, 0) 1 7→ (0, 1) 1 7→ (0, 1, 0, 1) 2 7→ (1, 1) 2 7→ (0, 0, 1, 1) 3 7→ (1, 0) 3 7→ (0, 1, 1, 0) 4 7→ (1, 1, 1, 1) 5 7→ (1, 0, 1, 0) 6 7→ (1, 1, 0, 0) 7 7→ (1, 0, 0, 1). s−1 We define Φs : Zn2s → Zn22 as the component-wise extended map of ϕs . We can also define a Gray map Φ from Zα2 1 × Zα4 2 × Zα8 3 to Zn2 , where n = α1 + 2α2 + 4α3 , as follows: Φ(u1 | u2 | u3 ) = (u1 , Φ2 (u2 ), Φ3 (u3 )), for any ui ∈ Zα2ii , where 1 ≤ i ≤ 3. Let C ⊆ Zn2s be a Z2s -additive code of length n. We say that the Gray map image of C, say C = Φs (C), is a Z2s -linear code of length n2s−1 . Since C is a subgroup of Zn2s , it is isomorphic to Zt21s × Zt22s−1 × · · · × Zt2s , and we say that C, or equivalently C = Φs (C), is of type (n; t1 , . . . , ts ). Note that ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 3 |C| = 2st1 2(s−1)t2 · · · 2ts . Similarly, if C ⊆ Zα2 1 × Zα4 2 × Zα8 3 is a Z2 Z4 Z8 - additive code, we say that its Gray map image C = Φ(C) is a Z2 Z4 Z8 - linear code of length α1 + 2α2 + 4α3 . Since C can be seen as a subgroup of Zα8 1 +α2 +α3 , it is isomorphic to Zt81 × Zt42 × Zt23 , and we say that C, or equivalently C = Φ(C), is of type (α1 , α2 , α3 ; t1 , t2 , t3 ). We have that a Z2 Z4 -linear code C [10, 11] can can be seen as a Z2 Z4 Z8 -linear code of type (α1 , α2 , 0; 0, t2 , t3 ). In this case, we also write that the type of C is directly (α1 , α2 ; t2 , t3 ). Unlike linear codes over finite fields, linear codes over rings do not have a basis, but a generator matrix exists for these codes with a minimum number of rows. If C is a Z2 Z4 Z8 -additive code of type (α1 , α2 , α3 ; t1 , t2 , t3 ), then |C| = 8t1 4t2 2t3 and there exist a generator matrix with t1 + t2 + t3 rows. Two structural properties of codes over Z2 are the rank and dimension of the kernel. The rank of a code C over Z2 is simply the dimension of the linear span of C, say ⟨C⟩. The kernel of a code C over Z2 is defined as K(C) = {x ∈ Zn2 : x + C = C} [3]. If the all-zero vector belongs to C, then K(C) is a linear subcode of C. Note also that if C is linear, then K(C) = C = ⟨C⟩. We denote the rank of C as rank(C) and the dimension of the kernel as ker(C). These parameters can be used to distinguish between nonequivalent codes since equivalent ones have the same rank and dimension of the kernel. A binary code with length n, 2n codewords, and minimum distance n/2 is called a Hadamard code. Hadamard codes can be constructed from Hadamard matrices [1, 26]. Note that linear Hadamard codes are first- order Reed-Muller codes, or equivalently, the dual of extended Hamming codes [26, Ch.13 §3]. The Z2s -additive codes such that after the Gray map Φs give Hadamard codes are called Z2s -additive Hadamard codes, and the corresponding images are called Z2s -linear Hadamard codes. Similarly, the Z2 Z4 Z8 -additive codes such that after the Gray map Φ give Hadamard codes are called Z2 Z4 Z8 -additive Hadamard codes, and the corresponding images are called Z2 Z4 Z8 -linear Hadamard codes. It is well-known that Z4 -linear Hadamard codes (that is, Z2 Z4 -linear Hadamard code with α1 = 0) and Z2 Z4 -linear Hadamard codes with α1 ̸= 0 can be classified by using either the rank or the dimension of the kernel [23, 28]. Moreover, in [25], it is shown that each Z4 -linear Hadamard code is equivalent to a Z2 Z4 -linear Hadamard code with α1 ̸= 0. Later, in [16, 6, 18, 4], a recursive construction for Zps -linear Hadamard codes, with p prime, is described, the linearity is established, and a partial classification by using the dimension of the kernel is obtained, giving the exact amount of nonequivalent such codes for some parameters. In [17], a complete classifi- cation of Z8 -linear Hadamard codes by using the rank and dimension of the kernel is provided, giving the exact amount of nonequivalent such codes. For any t ≥ 2, the full classification of Zp Zp2 -linear Hadamard codes of length pt , with α1 ̸= 0, α2 ̸= 0, and p ≥ 3 prime, is given in [5, 7], by using just the dimension of the kernel. 4 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA The paper contributes to the study of codes over rings Zps , which were first studied by Blake [9] and Shankar [30] in 1975 and 1979, respectively. These codes have become more significant after the publication of [19]. It is also important to note that Hadamard codes are two weight codes, which have been widely studied in [31, 32]. On the other hand, the classification of nonlinear Hadamard codes is still an open problem. By giving an additive structure, as Zps -linear, Zp Zp2 -linear or Z2 Z4 Z8 -linear codes, to some of them, and showing whether they are equivalent or not among them, we are providing a partial classification for these codes. From a more practical point of view, since Hadamard codes are optimal and have a high correction capability, they appear in different aspects re- lated to the transmission of information, such as in digital communication with satellites [21], in CDMA phones to modulate the transmission of in- formation and minimize interference with other transmissions [34] and, in general, in different OCDMA multiple access systems to allow access to multiple users asynchronously and simultaneously [22]. Other applications are found in cryptography [27] or in information hiding (steganography and watermarking) [35]. See [21] for more applications in other fields. This paper is focused specifically on Z2 Z4 Z8 -linear Hadamard codes with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0, generalizing some results given for Z2 Z4 - linear Hadamard codes with α1 ̸= 0 and α2 ̸= 0 in [28, 29] related to a recursive construction of such codes. These codes are also compared with the Z4 -linear, Z8 -linear, and in general Z2s -linear Hadamard codes with s ≥ 2 considered in [16]. In general, the construction of Z2 Z4 Z8 - linear Hadamard codes allows to construct codes which are not equivalent to Z2s -linear Hadamard codes, with s ≥ 2. It is known that each Z4 -linear Hadamard code is equivalent to a Z2 Z4 -linear Hadamard code with α1 ̸= 0 and α2 ̸= 0. Unlike Z2 Z4 -linear Hadamard codes, in general, this family of Z2 Z4 Z8 -linear Hadeamard codes does not include the family of Z4 -linear or Z8 -linear Hadamard codes, or Z2s -linear Hadamard codes with s ≥ 4. In Example 2.3, we show that all the nonlinear Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 of length 211 are not equivalent to each other, nor to any Z2 Z4 -linear Hadamard code, nor to any Z2s -linear Hadamard code [16], with s ≥ 2, of the same length 211 . This paper is organized as follows. In Section 2, we describe a recursive construction of Z2 Z4 Z8 -linear Hadamard codes of type (α1 , α2 , α3 ; t1 , t2 , t3 ) with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0. We emphasise that, unlike Z2 Z4 -linear Hadamard codes, in general, this family of Z2 Z4 Z8 - linear Hadeamard codes does not include the family of Z4 -linear or Z8 -linear Hadamard codes. In Section 3, we present other recursive constructions and show that we obtain Z2 Z4 Z8 -linear Hadamard codes equivalent to the previ- ous ones. Finally, in Section 4, we give some conclusions and further research on this topic. ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 5 2. Recursive construction of Z2 Z4 Z8 -additive Hadamard codes The description of generator matrices having a minimum number of rows for Z4 -additive Hadamard, some families of Z2s -additive Hadamard, and in general Zps -additive Hadamard codes, with s ≥ 2 and p prime, are given in [23], [16], and [6], respectively. Similarly, generator matrices having a minimum number of rows for Zp Zp2 -additive Hadamard codes with α1 ̸= 0, α2 ̸= 0 and p prime, as long as a recursive construction of these matrices, are given in [28, 29] when p = 2 and in [5] when p ≥ 3. In this section, we generalize these results for Z2 Z4 Z8 -additive Hadamard codes with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0. Specifically, we define a recursive construction for the generator matrices of a family of these codes and establish that they generate Z2 Z4 Z8 -additive Hadamard codes. Let 0, 1, 2, . . . , 7 be the vectors having the elements 0, 1, 2, . . . , 7 repeated in each coordinate, respectively. If A is a generator matrix of a Z2 Z4 Z8 - additive code, that is, a subgroup of Zα2 1 × Zα4 2 × Zα8 3 for some integers α1 , α2 , α3 ≥ 0, then we denote by A1 the submatrix of A with the first α1 columns over Z2 , A2 the submatrix with the next α2 columns over Z4 , and A3 the submatrix with the last α3 columns over Z8 . We have that A = (A1 | A2 | A3 ), where the number of columns of Ai is αi for i ∈ {1, 2, 3}. Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. Now, we construct recursively matrices At1 ,t2 ,t3 having t1 rows of order 8, t2 rows of order 4, and t3 rows of order 2 as follows. First, we consider the following matrix:   1,0,1 1 1 2 4 (2) A = . 0 1 1 1 Then, we apply the following constructions. If we have a matrix Aℓ−1,0,1 = (A1 | A2 | A3 ), with ℓ ≥ 2, we may construct the matrix   A1 A1 M1 A2 A2 A2 A2 M2 A3 A3 ··· A3 (3) Aℓ,0,1 = , 0 1 1 0 1 2 3 1 0 1 ··· 7 where M1 = {zT : z ∈ {2} × {0, 2}ℓ−1 } and M2 = {zT : z ∈ {4} × {0, 2, 4, 6}ℓ−1 }. We perform Construction (3) until ℓ = t1 . If we have a matrix At1 ,ℓ−1,1 = (A1 | A2 | A3 ), with t1 ≥ 1 and ℓ ≥ 1, we may construct the matrix   t1 ,ℓ,1 A1 A1 M1 A2 A2 A2 A2 A3 A3 A3 A3 (4) A = , 0 1 1 0 1 2 3 0 2 4 6 where M1 = {zT : z ∈ {2} × {0, 2}t1 +ℓ−1 }. We repeat Construction (4) until ℓ = t2 . Finally, if we have a matrix At1 ,t2 ,ℓ−1 = (A1 | A2 | A3 ), with t1 ≥ 1, t2 ≥ 0, and ℓ ≥ 2, we may construct the matrix   t1 ,t2 ,ℓ A1 A1 A2 A2 A3 A3 (5) A = . 0 1 0 2 0 4 We repeat Construction (5) until ℓ = t3 . Thus, in this way, we obtain At1 ,t2 ,t3 . 6 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA Summarizing, in order to achieve At1 ,t2 ,t3 from A1,0,1 , first we add t1 − 1 rows of order 8 by applying Construction (3) t1 −1 times, starting from A1,0,1 up to obtain At1 ,0,1 ; then we add t2 rows of order 4 by applying Construction (4) t2 times, up to generate At1 ,t2 ,1 ; and, finally, we add t3 − 1 rows of order 2 by applying Construction (5) t3 − 1 times to achieve At1 ,t2 ,t3 . Note that the first row always has the row (1 | 2 | 4). Example 2.1. By using the constructions described in (3), (4), and (5), we obtain the following matrices A2,0,1 , A1,1,1 and A1,1,2 , respectively, starting from A1,0,1 given in (2):   11 11 22 2222 4444 44444444 (6) A2,0,1 =  01 01 02 1111 0246 11111111  , 00 11 11 0123 1111 01234567   11 11 22 2222 4444 (7) A1,1,1 =  01 01 02 1111 1111  , 00 11 11 0123 0246   1111 1111 222222 222222 4444 4444  0101 0101 021111 021111 1111 1111  A1,1,2 =  0011 . 0011 110123 110123 0246 0246  0000 1111 000000 222222 0000 4444 In order to obtain A2,1,1 , we start with A1,0,1 , we apply Construction (3) to obtain A2,0,1 = (A1 | A2 | A3 ) given in (6), and then we apply (4) to obtain   2222  A1 A1 0022 A2 A2 A2 A2 A3 A3 A3 A3  A2,1,1 =  .  0202  0 1 1 0 1 2 3 0 2 4 6 The Z2 Z4 Z8 -additive code generated by At1 ,t2 ,t3 is denoted by Ht1 ,t2 ,t3 , and the corresponding Z2 Z4 Z8 -linear code Φ(Ht1 ,t2 ,t3 ) by H t1 ,t2 ,t3 . Lemma 2.1. Let t1 ≥ 1 and t2 ≥ 0 be integers. Let Ht1 ,t2 ,1 be the Z2 Z4 Z8 - additive code of type (α1 , α2 , α3 ; t1 , t2 , 1) generated by At1 ,t2 ,1 . Then, 2t1 +t2 = α1 , 4t1 +t2 = α1 + 2α2 and 8t1 4t2 = α1 + 2α2 + 4α3 . Proof. First, we prove this lemma for the code Ht1 ,0,1 by induction on t1 ≥ 1. Note that the lemma holds for the code H1,0,1 of type (2, 1, 1; 1, 0, 1). Assume that the lemma holds for the code Ht1 ,0,1 of type (α1 , α2 , α3 ; t1 , 0, 1), that is, (8) 2t1 = α1 , 4t1 = α1 + 2α2 and 8t1 = α1 + 2α2 + 4α3 . By using Construction (3), the type of Ht1 +1,0,1 is (α1′ , α2′ , α3′ ; t1 + 1, 0, 1), where (9) α1′ = 2α1 , α2′ = 2t1 + 4α2 and α3′ = 4t1 + 8α3 . ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 7 Thus, from (8) and (9), 2t1 +1 = 2α1 = α1′ , 4t1 +1 = 4α1 + 8α2 = 2α1 + 2α1 + 8α2 = α1′ + 2t1 +1 + 8α2 = α1′ + 2α2′ and 8t1 +1 = 8α1 + 16α2 + 32α3 = 2α1 +(2α1 +8α2 )+(4α1 +8α2 +32α3 ) = 2α1 +(2t1 +1 +8α2 )+(4t1 +1 +32α3 ) = α1′ + 2α2′ + 4α3′ . Therefore, the lemma holds for the code Ht1 ,0,1 . Next, we prove this lemma for the code Ht1 ,t2 ,1 by induction on t2 ≥ 0. As- sume that the lemma holds for the code Ht1 ,t2 ,1 of type (α1 , α2 , α3 ; t1 , t2 , 1), that is, (10) 2t1 +t2 = α1 , 4t1 +t2 = α1 + 2α2 , and 8t1 4t2 = α1 + 2α2 + 4α3 . By using Construction (4), the type of Ht1 ,t2 +1,1 is (α1′ , α2′ , α3′ ; t1 , t2 + 1, 1), where (11) α1′ = 2α1 , α2′ = 2t1 +t2 + 4α2 and α3′ = 4α3 . Thus, from (10) and (11), 2t1 +(t2 +1) = 2α1 = α1′ , 4t1 +(t2 +1) = 4α1 + 8α2 = 2α1 +2α1 +8α2 = α1′ +2t1 +t2 +1 +8α2 = α1′ +2α2′ and 8t1 4t2 +1 = 4α1 +8α2 + 16α3 = 2α1 +(2α1 +8α2 )+16α3 = α1′ +(2t1 +t2 +1 +8α2 )+4α3′ = α1′ +2α2′ +4α3′ . Therefore, the lemma holds for the code Ht1 ,t2 +1,1 . This completes the proof. □ Proposition 2.1. Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. Let Ht1 ,t2 ,t3 be the Z2 Z4 Z8 -additive code of type (α1 , α2 , α3 ; t1 , t2 , t3 ) generated by At1 ,t2 ,t3 . Then, α1 = 2t1 +t2 +t3 −1 , (12) α1 + 2α2 = 4t1 +t2 2t3 −1 , α1 + 2α2 + 4α3 = 8t1 4t2 2t3 −1 . Proof. We prove this result for the code Ht1 ,t2 ,t3 by induction on t3 ≥ 1. By Lemma 2.1, the proposition holds for t3 = 1, that is, for the code Ht1 ,t2 ,1 . Assume that it holds for the code Ht1 ,t2 ,t3 of type (α1 , α2 , α3 ; t1 , t2 , t3 ), that is, (12) holds. By using Construction (5), the type of Ht1 ,t2 ,t3 +1 is (α1′ , α2′ , α3′ ; t1 , t2 , t3 + 1), where (13) α1′ = 2α1 , α2′ = 2α2 , and α3′ = 2α3 . Thus, from (12) and (13), 2t1 +t2 +t3 = 2α1 = α1′ , 4t1 +t2 2t3 = 2α1 + 4α2 = α1′ + 2α2′ and 8t1 4t2 2t3 = 2α1 + 4α2 + 8α3 = α1′ + 2α2′ + 4α3′ . Therefore, the proposition is true for the code Ht1 ,t2 ,t3 +1 . This completes the proof. □ Corollary 2.1. Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. Let Ht1 ,t2 ,t3 be the Z2 Z4 Z8 -additive code of type (α1 , α2 , α3 ; t1 , t2 , t3 ) generated by At1 ,t2 ,t3 . Then, α1 = 2t1 +t2 +t3 −1 , α2 = 4t1 +t2 2t3 −2 − 2t1 +t2 +t3 −2 , α3 = 8t1 4t2 −1 2t3 −1 − 4t1 +t2 −1 2t3 −1 . 8 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA Remark 2.1. By Corollary 2.1, we have that the Z2 Z4 Z8 -additive codes Ht1 ,t2 ,t3 of type (α1 , α2 , α3 ; t1 , t2 , t3 ) generated by At1 ,t2 ,t3 , so constructed recursively from (3), (4), and (5), satisfy that α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0. Remark 2.2. The construction of the generator matrices At1 ,t2 ,t3 is a gener- alization of the recursive construction of the generator matrices of the Z2 Z4 - additive Hadamard codes of type (α1 , α2 ; t2 , t3 ) with α1 ̸= 0 and α2 ̸= 0, given in [29]. Note that if we do not consider the coordinates over Z8 in Constructions (3), (4), and (5), we have that (3) and (4) become   ℓ,1 A 1 A 1 M1 A 2 A 2 A 2 A 2 (14) A = , 0 1 1 0 1 2 3 where Aℓ−1,1 = (A1 | A2 ) and M1 = 2A1 = {zT : z ∈ {2} × {0, 2}ℓ−1 } (up to a column permutation); and Construction (5) become   A1 A1 A2 A2 (15) At2 ,ℓ = , 0 1 0 2 where At2 ,ℓ−1 = (A1 | A2 ). Then, starting from the following matrix:   1,1 1 1 2 (16) A = , 0 1 1 and applying (14) and (15) in the same way as above, we obtain the gen- erator matrices At2 ,t3 of the known Z2 Z4 -additive Hadamard codes of type (α1 , α2 ; t2 , t3 ) with α1 ̸= 0 and α2 ̸= 0 [28, 29]. The Z2 Z4 -additive code generated by At2 ,t3 is denoted by Ht2 ,t3 , and the corresponding Z2 Z4 -linear code Φ(Ht2 ,t3 ) by H t2 ,t3 . When we include all the elements of Z2i , where 1 ≤ i ≤ 3, as coordi- nates of a vector, we place them in increasing order. For a set S ⊆ Z2i and λ ∈ Z2i , where i ∈ {1, 2, 3}, we define λS = {λj : j ∈ S} and S + λ = {j + λ : j ∈ S}. As before, when including all the elements in those sets as coordinates of a vector, we place them in increasing order. For example, 2Z8 = {0, 4, 6, 8}, (Z4 , Z4 ) = (0, 1, 2, 3, 0, 1, 2, 3) ∈ Z84 and (Z2 | Z4 | 2Z8 , 4Z8 ) = (0, 1 | 0, 1, 2, 3 | 0, 2, 4, 6, 0, 4) ∈ Z22 × Z44 × Z68 . Lemma 2.2. Let 1 ≤ i ≤ 3 and j ∈ {0, 1, . . . , i − 1}. (1) If µ ∈ 2j Z2i , then 2j Z2i + µ = 2j Z2i . (2) If µ ∈ 2j Z2i , then (2j Z2i , .m. ., 2j Z2i ) + µ1, where m ≥ 1, is a permu- tation of the vector (2j Z2i , .m. ., 2j Z2i ). (3) If µ ∈ 2Z2i , then (Z2i \2Z2i ) + µ = Z2i \2Z2i . i (4) If µ ∈ Z2i , then (0, . . . , 2i − 1) + (µ, ℓ·2 . . ., µ), where ℓ ≥ 1 and k = (k, . ℓ. ., k) for k ∈ Z2i , is a permutation of (Z2i , . ℓ. ., Z2i ). Proof. Item 1 follows from the fact that Z2i is a ring and 2j Z2i is an ideal of Z2i . Item 2 follows from Item 1. For Item 3, it x ∈ (Z2i \2Z2i ) + µ, then x − µ ∈ Z2i \2Z2i . Assume that x ∈/ Z2i \2Z2i , so x ∈ 2Z2i . Since 2Z2i is an ideal of Z2i , we have that ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 9 x − µ ∈ 2Z2i , which is a contradiction. Thus, x ∈ Z2i \2Z2i and hence (Z2i \2Z2i ) + µ ⊆ Z2i \2Z2i . In the same way, (Z2i \2Z2i ) − µ ⊆ Z2i \2Z2i . Hence, Z2i \2Z2i ⊆ (Z2i \2Z2i ) + µ and therefore (Z2i \2Z2i ) + µ = Z2i \2Z2i . i For Item 4, note that (0, . . . , 2i − 1) + (µ, ℓ·2 . . ., µ) is a permutation of i (17) (Z2i , . ℓ. ., Z2i ) + (µ, ℓ·2 . . ., µ). Since Z2i + µ = Z2i , (17) is a permutation of (Z2i , . ℓ. ., Z2i ). □ Lemma 2.3. Let 1 ≤ i ≤ 3, λ ∈ Z2i \2Z2i , and u ∈ Zn2i . Then, i (u, .2. ., u) + λ(0, . . . , 2i − 1) is a permutation of (Z2i , . n. ., Z2i ). Proof. Since λ ∈ Z2i \2Z2i , λ(0, . . . , 2i − 1) is a permutation of (0, . . . , 2i − 1) and we may consider λ = 1. Then, (u, . . . , u) + (0, . . . , 2i − 1) is a permuta- tion of (u1 + Z2i , . . . , un + Z2i ) = (Z2i , . n. ., Z2i ), where u = (u1 , . . . , un ). □ Lemma 2.4. Let u = (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ) ∈ Zm+2n+2r 4 , where m, n, r ≥ 0 and µ ∈ Z4 \2Z4 = {1, 3}. Then, (u, u, u, u) + (0, 2, 0, 2) is a permutation of (2Z4 , .4n . ., 2Z4 , Z4 \2Z4 , 4r+2m . . . , Z4 \2Z4 ). Proof. By Items 1 and 3 of Lemma 2.2, u + 2 is a permutation of (µ + 2, .m. . , µ + 2, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ). Let k = (µ, .m. ., µ). Since µ ∈ {1, 3}, we have that (k, k, k, k) + (0, 2, 0, 2) is a permutation of (Z4 \2Z4 , .2m .. , Z4 \2Z4 ). Therefore, (u, u, u, u) + (0, 2, 0, 2) is a permutation of (2Z4 , .4n .. 4r+2m , 2Z4 , Z4 \2Z4 , . . . , Z4 \2Z4 ). □ ′ ′ ′ ′ Lemma 2.5. Let u = (µ′ , .m. ., µ′ , µ′′ , .m. ., µ′′ , 2Z8 , .n. ., 2Z8 , Z8 \2Z8 , .r. ., Z8 \2Z8 ) ∈ ′ +4n′ +4r ′ Z2m 8 , where m′ , n′ , r′ ≥ 0 and µ, µ′ ∈ Z8 \2Z8 = {1, 3, 5, 7}. Then, ′ ′ ′ (1) (u, u, u, u)+(0, 2, 4, 6) is a permutation of (2Z8 , .4n. ., 2Z8 , Z8 \2Z8 , 4r .+2m .. , Z8 \2Z8 ); ′ ′ (2) (u, u, u, u)+(0, 4, 0, 4) is a permutation of (µ′ , 4m . . ., µ′ , µ′ +4, 4m . . ., µ′ + ′ ′ 4, 2Z8 , .4n. ., 2Z8 , Z8 \2Z8 , .4r. ., Z8 \2Z8 ) if µ′ = µ′′ or µ′ = µ′′ + 4, or a ′ ′ ′ permutation of (2Z8 , .4n. ., 2Z8 , Z8 \2Z8 , 4r .+2m . . , Z8 \2Z8 ) otherwise. Proof. For Item 1, by Items 1 and 3 of Lemma 2.2, if j ∈ {0, 2, 4, 6}, then u+j ′ ′ ′ ′ is a permutation of (µ′ +j, .m. ., µ′ +j, µ′′ +j, .m. ., µ′′ +j, 2Z8 , .n. ., 2Z8 , Z8 \2Z8 , .r. . ′ ′ , Z8 \2Z8 ). Let k′ = (µ′ , .m. ., µ′ , µ′′ .m. ., µ′′ ). Since µ′ , µ′′ ∈ {1, 3, 5, 7}, we have ′ that (k′ , . 4. ., k′ ) + (0, 2, 4, 6) is a permutation of (Z8 \2Z8 , 2m . . ., Z8 \2Z8 ) and ′ ′ ′ hence (u, u, u, u)+(0, 2, 4, 6) is a permutation of (2Z8 , .4n. ., 2Z8 , Z8 \2Z8 , 4r .+2m .. , Z8 \2Z8 ). ′ For item 2, we have (k′ , . 4. ., k′ ) + (0, 4, 0, 4) is a permutation of (µ′ , 4m ... ′ , µ′ , µ′ + 4, 4m. . ., µ′ + 4) if µ′ = µ′′ or µ′ = µ′′ + 4, or a permutation of ′ (Z8 \2Z8 , 2m . . ., Z8 \2Z8 ) otherwise. Therefore, (u, u, u, u) + (0, 4, 0, 4) is a per- ′ ′ ′ ′ mutation of (µ′ , 4m . . ., µ′ , µ′ + 4, 4m . . ., µ′ + 4, 2Z8 , .4n. ., 2Z8 , Z8 \2Z8 , .4r. ., Z8 \2Z8 ) 10 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA ′ ′ ′ if µ′ = µ′′ or µ′ = µ′′ + 4, or a permutation of (2Z8 , .4n. ., 2Z8 , Z8 \2Z8 , 4r .+2m .. , Z8 \2Z8 ) otherwise. □ Lemma 2.6. Let u = (µ, .m. ., µ, 4Z8 , . n. ., 4Z8 , 2Z8 \4Z8 , . r. ., 2Z8 \4Z8 ) ∈ Zm+2n+2r 8 , where m, n, r ≥ 0 and µ ∈ 2Z8 \4Z8 = {2, 6}. Then, (1) (u, u, u, u) + (0, 2, 4, 6) is a permutation of (2Z8 , 2r+2n+m . . . , 2Z8 ); (2) (u, u, u, u)+(0, 4, 0, 4) is a permutation of (4Z8 , . . ., 4Z8 , 2Z8 \4Z8 , 4r+2m 4n ... , 2Z8 \4Z8 ). Proof. By Item 1 of Lemma 2.2, if j ∈ {0, 4}, then u + j is a permutation of (µ + j, .m. ., µ + j, 4Z8 , . n. ., 4Z8 , 2Z8 \4Z8 , . r. ., 2Z8 \4Z8 ). Similarly, if j ∈ {2, 6}, then u + j is a permutation of (µ + j, .m. ., µ + j, 4Z8 , . r. ., 4Z8 , 2Z8 \4Z8 , . n. . , 2Z8 \4Z8 ). Let k = (µ, .m. ., µ). For Item 1, since µ ∈ {2, 6}, we have that (k, . 4. ., k) + (0, 2, 4, 6) is a permutation of (2Z8 , .m. ., 2Z8 ), and hence (u, u, u, u) + (0, 2, 4, 6) is a per- mutation of (2Z8 , 2r+2n+m . . . , 2Z8 ). For Item 2, we have (k, . 4. ., k)+(0, 4, 0, 4) is a permutation of (2Z8 \4Z8 , .2m .. , 2Z8 \4Z8 ). Therefore, (u, u, u, u) + (0, 4, 0, 4) is a permutation of (4Z8 , . . . 4n , 4Z8 , 2Z8 \4Z8 , 4r+2m . . . , 2Z8 \4Z8 ). □ Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. Let G t1 ,t2 ,t3 be the set of all codewords of the code generated by the matrix obtained from At1 ,t2 ,t3 after removing the row (1 | 2 | 4). Lemma 2.7. Let t1 ≥ 1 be an integer. Let z = (u1 , u1 | x1 , u2 , u2 , u2 , u2 | x2 , u3 , . 8. ., u3 ) ∈ G t1 +1,0,1 , (i−1)t1 where u = (u1 | u2 | u3 ) ∈ G t1 ,0,1 and xi−1 ∈ (2Z2i )2 for i ∈ {2, 3}. Then, (i−1)(t −1) (1) if o(z) = 8, then xi−1 is a permutation of (2Z2i , 2 . . .1 , 2Z2i ) for i ∈ {2, 3}. t −1 (2) if o(z) = 4, then x1 = 0 and x2 is a permutation of (4Z8 , 2·4. .1. , 4Z8 ). (3) if o(z) = 2, then x1 = 0 and x2 = 0. Proof. Let wj , where j ∈ {1, . . . , t1 + 2}, be the jth row of At1 +1,0,1 . Note that w1 = (1 | 2 | 4), and w2 , . . . , wt1 +2 are the rows of order 8, where wt1 +2 = (0, 1 | 1, 0, 1, 2, 3 | 1, 0, . . . , 7). Since any element of G t1 +1,0,1 can be written as z + λwt1 +2 , where λ ∈ Z8 , then z = tj=2 P 1 +1 rj wj = (u1 , u1 | 8 x1 , u2 , u2 , u2 , u2 | x2 , u3 , . . ., u3 ), where rj ∈ Z8 . By construction, x1 and x2 are generated by the rows of M1′ = {zT : z ∈ {0, 2}t1 } and M2′ = {zT : z ∈ {0, 2, 4, 6}t1 }, respectively. Thus, x1 = 0 or x1 is a permutation of t −1 t −1 (2Z4 , 2.1. . , 2Z4 ), and x2 = 0 or x2 is a permutation of (2Z8 , 4.1. . , 2Z8 ) or t −1 (4Z8 , 2·4. .1. , 4Z8 ). For Item 1, there exists at least one j ∈ {2, . . . , t1 + 1} such that rj ∈ {1, 3, 5, 7}. Therefore, by Item 1 of Lemma 2.2, xi−1 is a permutation of (i−1)(t −1) (2Z2i , 2 . . .1 , 2Z2i ) for i ∈ {2, 3}. ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 11 For Item 2, we have that rj ∈ 2Z8 for all j ∈ {2, . . . , t1 + 1} and there exist at least one j ∈ {2, . . . , t1 + 1} such that rj ∈ {2, 6}. Therefore, x1 = 0 t −1 and, by Item 1 of Lemma 2.2, x2 is a permutation of (4Z8 , 2·4. .1. , 4Z8 ). For Item 3, we have that rj ∈ 4Z8 for all j ∈ {2, . . . , t1 + 1} and there exist at least one j ∈ {2, . . . , t1 + 1} such that rj = 4. Therefore, x1 = 0 and x2 = 0. □ Lemma 2.8. Let t1 ≥ 1 and t2 ≥ 0 be integers. Let z = (u1 , u1 | x1 , u2 , u2 , u2 , u2 | u3 , u3 , u3 , u3 ) ∈ G t1 ,t2 +1,1 , t +t2 where u = (u1 | u2 | u3 ) ∈ G t1 ,t2 ,1 and x1 ∈ (2Z4 )2 1 . Then, t +t −1 (1) if o(z) = 8, then x1 is a permutation of (2Z4 , 2 1. . 2. , 2Z4 ). (2) if o(z) = 4, then x1 = 0 if u1 = 0, and x1 is a permutation of t +t −1 (2Z4 , 2 1. . 2. , 2Z4 ) otherwise. (3) if o(z) = 2, then x1 = 0. Proof. Let wi , where i ∈ {1, . . . , t1 + t2 + 2}, be the ith row of At1 ,t2 +1,1 . Note that w1 = (1 | 2 | 4), w2 , . . . , wt1 +1 are the rows of order 8, and wt1 +2 , . . . , wt1 +t2 +2 are the rows of order 4, where wt1 +t2 +2 = (0, 1 | 1, 0, 1, 2, 3 | 0, 2, 4, 6). Since any element of G t1 ,t2 +1,1 can be written as z + λwt1 +t2 +2 , where λ ∈ {0, 1, 2, 3}, then z = ti=2 P 1 +t2 +1 ri wi = (u1 , u1 | x1 , u2 , u2 , u2 , u2 | u3 , u3 , u3 , u3 ), where ri ∈ Z8 for i ∈ {2, . . . , t1 + 1} and ri ∈ {0, 1, 2, 3} for i ∈ {t1 + 2, . . . , t1 + t2 + 1}. By construction, x1 is generated by the rows of M1′ = {zT : z ∈ {0, 2}t1 +t2 }. Thus, x1 = 0 or x1 is a permutation of t +t −1 (2Z4 , 2 1. . 2. , 2Z4 ). For Item 1, there exists at least one i ∈ {2, . . . , t1 + 1} such that ri ∈ {1, 3, 5, 7}. Therefore, since x1 is of order at most two, x1 ̸= 0. For Item 2, we have that ri ∈ 2Z8 for all i ∈ {2, . . . , t1 + 1} and ri ∈ {0, 1, 2, 3} for all i ∈ {t1 + 2, . . . , t1 + t2 + 1}. Note that, since x1 and u1 are of order at most two, x1 ̸= 0 if and only if there exists at least one i for i ∈ {t1 + 2, . . . , t1 + t2 + 1} such that ri ∈ {1, 3}, or equivalently, if and only if u1 ̸= 0. For Item 2, we have that ri ∈ 4Z8 = {0, 4} for all i ∈ {2, . . . , t1 + 1} and ri ∈ {0, 2} for all i ∈ {t1 + 2, . . . , t1 + t2 + 1}. Therefore, since x1 is of order at most two, x1 = 0. □ Lemma 2.9. Let t1 ≥ 1 be an integer. Let Ht1 ,0,1 be the Z2 Z4 Z8 -additive code of type (α1 , α2 , α3 ; t1 , 0, 1) generated by At1 ,0,1 . Let u = (u1 | u2 | u3 ) ∈ G t1 ,0,1 . Then, (1) if o(u) = 8, then u1 contains every element of Z2 the same number of times, u2 is a permutation of (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. . , Z4 \2Z4 ) for some integers m, n, r ≥ 0 and µ ∈ {1, 3}, and u3 is a ′ ′ ′ ′ permutation of (µ′ , .m. ., µ′ , µ′′ , .m. ., µ′′ , 2Z8 , .n. ., 2Z8 , Z8 \2Z8 , .r. ., Z8 \2Z8 ) ′ ′ ′ ′ for some integers m , n , r ≥ 0 and µ, µ ∈ {1, 3, 5, 7}. (2) if o(u) = 4, then u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 21 ( α21 + α2 ) = 4t1 −1 times and α22 − α41 = 4t1 −1 − 2t1 −1 12 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA times the element 0, and u3 is a permutation of (µ, .m. ., µ, 4Z8 , . n. . , 4Z8 , 2Z8 \4Z8 , . r. ., 2Z8 \4Z8 ) for some integers m, n, r ≥ 0 and µ ∈ {2, 6}. (3) if o(u) = 2, then u1 = 0, u2 = 0, and u3 contains the element in 4Z8 \{0} = {4} exactly 41 ( α21 + α2 + 2α3 ) = 8t1 −1 times and α23 − 1 α1 t1 −1 − 4t1 −1 times the element 0. 4 ( 2 + α2 ) = 8 Proof. We perform a proof by induction on t1 ≥ 1. If t1 = 1, then by Lemma 2.1, α1 = 2, α2 = 1, α3 = 1, and G 1,0,1 = ⟨(0, 1 | 1 | 1)⟩. Let u = (u1 | u2 | u3 ) ∈ G 1,0,1 . Then, u = λ(0, 1 | 1 | 1), where λ ∈ Z8 . Thus, we have that u1 = λ(0, 1), u2 = (λ), and u3 = (λ). If o(u) = 8, then λ ∈ Z8 \2Z8 . Therefore, u satisfies Property 1. If o(u) = 4, then λ ∈ {2, 6}. In this case, u1 = (0, 0), u2 = (2) contains the element in 2Z4 \{0} = {2} exactly 1 = 21 ( α21 + α2 ) time and 0 = α22 − α41 times the element 0, and u3 = (λ). Thus, u satisfies Property 2. If o(u) = 2, then λ = 4. In this case, u1 = (0, 0), u2 = (0), and u3 = (4) contains the element in 4Z8 \{0} = {4} exactly 1 = 14 ( α21 +α2 +2α3 ) time and 0 = α23 − 14 ( α21 +α2 ) times the element 0. Thus, u satisfies Property 3. Therefore, the lemma holds for t1 = 1. Assume now that the lemma holds for the code Ht1 ,0,1 of type (α1 , α2 , α3 ; t1 , 0, 1) with t1 ≥ 1. By Lemma 2.1, we have that (18) 2t1 = α1 , 4t1 = α1 + 2α2 , and 8t1 = α1 + 2α2 + 4α3 . We must show that the lemma is also true for the code Ht1 +1,0,1 . Let v = (v1 | v2 | v3 ) ∈ G t1 +1,0,1 . We can write v = z + λw, where z = (u1 , u1 | x1 , u2 , u2 , u2 , u2 | x2 , u3 , . 8. ., u3 ), w = (0, 1 | 1, 0, 1, 2, 3 | t 1, 0, . . . , 7), u = (u1 | u2 | u3 ) ∈ G t1 ,0,1 , λ ∈ Z8 , x1 ∈ (2Z4 )2 1 such that ei- t −1 t ther x1 = 0 or x1 is a permutation of (2Z4 , 2.1. . , 2Z4 ), and x2 ∈ (2Z8 )4 1 such t −1 t −1 that either x2 = 0 or x2 is a permutation of (2Z8 , 4.1. . , 2Z8 ) or (4Z8 , 2·4. .1. , 4Z8 ). Then, v1 = (u1 , u1 ) + λ(0, 1) and, for i ∈ {2, 3}, i (19) vi = (xi−1 , ui , .2. ., ui ) + λ(1, 0, . . . , 2i − 1). If z = 0, then v = λw and it is easy to see that v satisfies Property 1 if λ ∈ Z8 \2Z8 = {1, 3, 5, 7}, Property 2 if λ ∈ {2, 6}, and Property 3 if λ = 4. Therefore, we focus on the case when z ̸= 0. Case 1: Assume that o(v) = 8. We have two subcases: when o(z) is arbitrary and λ ∈ Z8 \2Z8 , and when o(z) = 8 and λ ∈ 2Z8 . In both subcases, note that v1 contains every element of Z2 the same number of i times. For the first subcase, we have that (ui , .2. ., ui ) + λ(0, . . . , 2i − 1), for i ∈ {2, 3}, is a permutation of (Z2i , .α.i., Z2i ) by Lemma 2.3. Thus, from (19), vi is a permutation of (xi−1 + λ1, Z2i , .α.i., Z2i ). Since either xi−1 + λ1 = λ1, (i−1)(t −1) or xi−1 + λ1 is a permutation of (Z2i \2Z2i , 2 . . .1 , Z2i \2Z2i ), v satisfies Property 1. ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 13 For the second subcase when o(v) = 8, that is, when o(z) = 8 and λ ∈ 2Z8 , we have that o(u) = 8 and, by Item 1 of Lemma 2.7, xi−1 is a per- (i−1)(t −1) mutation of (2Z2i , 2 . . .1 , 2Z2i ) for i ∈ {2, 3}. By induction hypothesis, u satisfies Property 1 and then u2 is a permutation of (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ), where m, n, r ≥ 0 and µ ∈ {1, 3}, and u3 is a permutation of ′ ′ ′ ′ (µ′ , .m. ., µ′ , µ′′ , .m. ., µ′′ , 2Z8 , .n. ., 2Z8 , Z8 \2Z8 , .r. ., Z8 \2Z8 ), where m′ , n′ , r′ ≥ 0 and µ′ , µ′′ ∈ {1, 3, 5, 7}. From (19), v2 = (x1 , u2 , u2 , u2 , u2 )+ λ(1, 0, 1, 2, 3). If λ ∈ {0, 4}, then v2 = (x1 , u2 , u2 , u2 , u2 ) in v satisfies the same property as u2 in u; that is, Property 1. If λ ∈ {2, 6}, then v2 = (x1 , u2 , u2 , u2 , u2 ) + (2, 0, 2, 0, 2). By Item 1 of Lemma 2.2, we have t −1 that x1 + 2 is a permutation of (2Z4 , 2.1. . , 2Z4 ). Thus, by Lemma 2.4, v2 is a permutation of t −1 (2Z4 , 4n+2 . . .1 , 2Z4 , Z4 \2Z4 , 4r+2m . . . , Z4 \2Z4 ). Therefore, for λ ∈ 2Z8 , v2 satisfies Property 1. Now, we consider the co- ordinates in v3 . From (19), v3 = (x2 , u3 , . 8. ., u3 ) + λ(1, 0, . . . , 7). By Item 1 of Lemma 2.2, we have that, for λ ∈ 2Z8 , x2 + λ1 is a permutation of t −1 (2Z8 , 4.1. . , 2Z8 ). If λ = 0, it is easy to see that v3 satisfies Property 1. Note that λ(0, . . . , 7) is a permutation of (0, 2, 4, 6, 0, 2, 4, 6) if λ ∈ {2, 6}, and a permutation of (0, 4, 0, 4, 0, 4, 0, 4) if λ = 4. Thus, by Lemma 2.5, v3 satisfies Property 1. Therefore, if o(v) = 8, then v satisfies Property 1. Case 2: Assume that o(v) = 4. We have two subcases: when o(z) = 4 and λ ∈ 2Z8 , and when o(z) = 2 and λ ∈ {2, 6}. For the first subcase, since o(z) = 4, we have that o(u) = 4. Moreover, x1 = 0 and x2 is a t −1 permutation of (4Z8 , 2·4. .1. , 4Z8 ) by Item 2 of Lemma 2.7. By induction hypothesis, u satisfies Property 2. Then, u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 4t1 −1 times and 4t1 −1 − 2t1 −1 times the element 0, and u3 is a permutation of (µ, .m. ., µ, 4Z8 , . n. ., 4Z8 , 2Z8 \4Z8 , . r. ., 2Z8 \4Z8 ) for some integers m, n, r ≥ 0 and µ ∈ {2, 6}. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ ∈ 2Z8 , we have that v1 = 0. From (19), v2 = (x1 , u2 , u2 , u2 , u2 )+λ(1, 0, 1, 2, 3). If λ ∈ {0, 4}, then v2 = (x1 , u2 , u2 , u2 , u2 ). Since x1 = 0 is of length 2t1 , it is easy to see that v2 in v satisfies the same property as u2 in u; that is, Property 2. If λ ∈ {2, 6}, then v2 = (x1 , u2 , u2 , u2 , u2 ) + (2, 0, 2, 0, 2), where x1 = 0 is of length 2t1 . Note that u2 + 2 contains the element in 2Z4 \{0} = {2} as many times as u2 contains the element 0, and the element 0 as many times as u2 contains the element 2. Thus, v2 contains the element in 2Z4 \{0} = {2} exactly 2t1 + 2(4t1 −1 ) + 2(4t1 −1 − 2t1 −1 ) = 4t1 times and 2(4t1 −1 ) + 2(4t1 −1 − 2t1 −1 ) = 4t1 − 2t1 times the element 0. Therefore, for λ ∈ 2Z8 , v2 satisfies Property 2. Now, we con- sider the coordinates in v3 . From (19), v3 = (x2 , u3 , . 8. ., u3 ) + λ(1, 0, . . . , 7). 14 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA If λ = 0, it is easy to see that v3 satisfies Property 2. For λ = 4, x2 + λ1 is a t −1 permutation of (4Z8 , 2·4. .1. , 4Z8 ), and for λ ∈ {2, 6}, it is a permutation of t −1 (2Z8 \4Z8 , 2·4. .1. , 2Z8 \4Z8 ). Note that λ(0, . . . , 7) is a permutation of (0, 2, 4, 6, 0, 2, 4, 6) if λ ∈ {2, 6}, and a permutation of (0, 4, 0, 4, 0, 4, 0, 4) if λ = 4. Hence, by Lemma 2.6, v3 also satisfies Property 2, and so does v. Now, we consider the second subcase, when o(z) = 2 and λ ∈ {2, 6}. Since o(z) = 2, we have that o(u) = 2. Then, by Item 3 of Lemma 2.7, x1 = 0 and x2 = 0. By induction hypothesis, u satisfies Property 3, so u1 = 0, u2 = 0, and u3 contains the element in 4Z8 \{0} = {4} exactly m = 8t1 −1 times and m′ = 8t1 −1 − 4t1 −1 times the element 0. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ ∈ {2, 6}, we have that v1 = 0. From (19), v2 = (x1 , u2 , u2 , u2 , u2 ) + (2, 0, 2, 0, 2). Since x1 = 0 and u2 = 0, of length α1 and α2 , respectively, we have that v2 = (2, 0, 2, 0, 2). Therefore, v2 contains the element in 2Z4 \{0} = {2} exactly α1 + 2α2 = 4t1 times and 2α2 = 4t1 − 2t1 times the element 0, by (18). Therefore, v2 satisfies Property 2. Now, we consider the coordinates in v3 . From (19), v3 = (x2 , u3 , . 8. . t , u3 ) + λ(1, 0, . . . , 7). Since x2 = 0, x2 + λ1 = (λ, .4.1., λ). Note that u3 is a permutation of ′ ′ (4, m−m . . . , 4, 4Z8 , .m. ., 4Z8 ). Moreover, since λ ∈ {2, 6}, λ(0, . . . , 7) is a permutation of (0, 2, 4, 6, 0, 2, 4, 6). Thus, by Item 1 of Lemma 2.2, (u3 , . 8. ., u3 ) + (0, 2, 4, 6, 0, 2, 4, 6) is a per- mutation of ′ ′ (2Z8 , 2(m−m . . .)+4m , 2Z8 ). t ′ ′ Thus, v3 is a permutation of (λ, .4.1., λ, 2Z8 , 2(m−m . . .)+4m , 2Z8 ) with λ ∈ {2, 6}, and hence v3 also satisfies Property 2 and so does v. Therefore, if o(v) = 4, then v satisfies Property 2. Case 3: Assume that o(v) = 2. Then, o(z) = 2 and λ ∈ {0, 4}. Since o(z) = 2, then o(u) = 2. Moreover, x1 = 0 and x2 = 0 by Item 3 of Lemma 2.7. By induction hypothesis, u satisfies Property 3, and then u1 = 0, u2 = 0, and u3 contains the element in 4Z8 \{0} = {4} exactly 8t1 −1 times and 8t1 −1 −4t1 −1 times the element 0. Since v1 = (u1 , u1 )+λ(0, 1), v1 = 0. From (19), v2 = (x1 , u2 , u2 , u2 , u2 ) + λ(1, 0, 1, 2, 3), where x1 = 0 and u2 = 0, so v2 = 0. From (19), v3 = (x2 , u3 , . 8. ., u3 ) + λ(1, 0, . . . , 7), where x2 = 0 is of length 4t1 . If λ = 0, it is easy to see that v3 satisfies Property 3. If λ = 4, v3 = (x2 , u3 , . 8. ., u3 ) + (4, 0, 4, 0, 4, 0, 4, 0, 4). Note that u3 + 4 contains the element in 4Z8 \{0} = {4} as many times as u3 contains the element 0, and the element 0 as many times as u3 contains the element 4. Then, v3 contains the element 4 exactly 4t1 + 4(8t1 −1 ) + 4(8t1 −1 − 4t1 −1 ) = 8t1 times and 4(8t1 −1 ) + 4(8t1 −1 − 4t1 −1 ) = 8t1 − 4t1 the element 0. Therefore, v satisfies Property 3. This completes the proof. □ ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 15 Lemma 2.10. Let t1 ≥ 1 and t2 ≥ 0 be integers. Let Ht1 ,t2 ,1 be the Z2 Z4 Z8 - additive code of type (α1 , α2 , α3 ; t1 , t2 , 1) generated by At1 ,t2 ,1 . Let u = (u1 | u2 | u3 ) ∈ G t1 ,t2 ,1 . (1) If o(u) = 8, then u has the following property: (a) u1 contains every element of Z2 the same number of times, u2 is a permutation of (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ) for some integers m, n, r ≥ 0 and µ ∈ {1, 3}, and u3 is a permu- ′ ′ ′ ′ tation of (µ′ , .m. ., µ′ , µ′′ , .m. ., µ′′ , 2Z8 , .n. ., 2Z8 , Z8 \2Z8 , .r. ., Z8 \2Z8 ) for some integers m′ , n′ , r′ ≥ 0 and µ, µ′ ∈ {1, 3, 5, 7}. (2) If o(u) = 4, then u has one of the following properties: (a) u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 1 α1 t1 +t2 −1 times and α2 − α1 = 4t1 +t2 −1 − 2t1 +t2 −1 2 ( 2 + α2 ) = 4 2 4 times the element 0, and u3 is a permutation of (µ, .m. ., µ, 4Z8 , . n. . , 4Z8 , 2Z8 \4Z8 , . r. ., 2Z8 \4Z8 ) for some integers m, n, r ≥ 0 and µ ∈ {2, 6}. (b) u1 contains every element of Z2 the same number of times, u2 is a permutation of (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ) for some integers m, n, r ≥ 0 and µ ∈ {1, 3}, and u3 is a permu- ′ tation of (4Z8 , . t. ., 4Z8 , 2Z8 \4Z8 , . t. ., 2Z8 \4Z8 ) for some integers t, t′ ≥ 0. (3) If o(u) = 2, then u has one of the following properties: (a) u1 = 0, u2 = 0, and u3 contains the element in 4Z8 \{0} = {4} exactly 41 ( α21 +α2 +2α3 ) = 8t1 −1 4t2 times and α23 − 14 ( α21 +α2 ) = 8t1 −1 4t2 − 4t1 +t2 −1 times the element 0. (b) u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 1 α1 t1 +t2 −1 times and α2 − α1 = 4t1 +t2 −1 − 2t1 +t2 −1 2 ( 2 + α2 ) = 4 2 4 times the element 0, and u3 is a permutation of (4Z8 , .m. ., 4Z8 ) for some m ≥ 0. Proof. We prove this lemma by induction on t2 ≥ 0. The lemma holds for the code Ht1 ,0,1 by Lemma 2.9. Assume that the lemma holds for the code Ht1 ,t2 ,1 of type (α1 , α2 , α3 ; t1 , t2 , 1) with t1 ≥ 1 and t2 ≥ 0. By Lemma 2.1, we have that (20) 2t1 +t2 = α1 , 4t1 +t2 = α1 + 2α2 , and 8t1 4t2 = α1 + 2α2 + 4α3 . We must show that the lemma is also true for the code Ht1 ,t2 +1,1 . Let v = (v1 | v2 | v3 ) ∈ G t1 ,t2 +1,1 . We can write v = z + λw, where z = (u1 , u1 | x1 , u2 , u2 , u2 , u2 | u3 , u3 , u3 , u3 ), w = (0, 1 | 1, 0, 1, 2, 3 | t +t 0, 2, 4, 6), u = (u1 | u2 | u3 ) ∈ G t1 ,t2 ,1 , λ ∈ {0, 1, 2, 3}, and x1 ∈ (2Z4 )2 1 2 16 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA t +t −1 such that either x1 = 0 or a permutation of (2Z4 , 2 1. . 2. , 2Z4 ). Then, v1 = (u1 , u1 ) + λ(0, 1), (21) v2 = (x1 , u2 , u2 , u2 , u2 ) + λ(1, 0, 1, 2, 3), v3 = (u3 , u3 , u3 , u3 ) + λ(0, 2, 4, 6). If z = 0, then v = λw. It is easy to see that v satisfies Property 2b if λ ∈ {1, 3} and Property 3b if λ = 2. Therefore, we focus on the case when z ̸= 0. Case 1: Assume that o(v) = 8. Then, o(z) = 8 and λ ∈ {0, 1, 2, 3}. We have that o(u) = 8 and, by Item 1 of Lemma 2.8, x1 is a permutation t +t −1 of (2Z4 , 2 1. . 2. , 2Z4 ). By induction hypothesis, u satisfies Property 1a. Then, u1 contains every element of Z2 the same number of times, u2 is a permutation of (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ), where m, n, r ≥ 0 and µ ∈ {1, 3}, and u3 is a permutation of ′ ′ ′ ′ (µ′ , .m. ., µ′ , µ′′ , .m. ., µ′′ , 2Z8 , .n. ., 2Z8 , Z8 \2Z8 , .r. ., Z8 \2Z8 ), where m′ , n′ , r′ ≥ 0 and µ′ , µ′′ ∈ {1, 3, 5, 7}. First, since v1 = (u1 , u1 ) + λ(0, 1), v1 contains every element of Z2 the same number of times, for any λ ∈ {0, 1, 2, 3}. Second, from (21), v2 = (x1 , u2 , u2 , u2 , u2 ) + λ(1, 0, 1, 2, 3). If λ = 0, then v2 clearly satisfies 1a. If λ ∈ {1, 3}, then we have that (u2 , u2 , u2 , u2 ) + λ(0, 1, 2, 3) is a permutation of (Z4 , .α.2., Z4 ) by Lemma 2.3. t +t −1 For λ ∈ {1, 3}, since x1 + λ1 is a permutation of (Z4 \2Z4 , 2 1. . 2. , Z4 \2Z4 ) by Item 3 of Lemma 2.2, we have that v2 satisfies Property 1a. If λ = 2, v2 = (x1 , u2 , u2 , u2 , u2 )+(2, 0, 2, 0, 2). By Item 1 of Lemma 2.2, we have that t +t −1 x1 +2 is a permutation of (2Z4 , 2 1. . 2. , 2Z4 ). Therefore, by Lemma 2.4, v2 is t +t −1 a permutation of (2Z4 , 4n+2. 1. . 2 , 2Z4 , Z4 \2Z4 , 4r+2m . . . , Z4 \2Z4 ) and then v2 satisfies Property 1a. Finally, we consider the coordinates in v3 . From (21), v3 = (u3 , u3 , u3 , u3 ) + λ(0, 2, 4, 6). If λ = 0, then v3 clearly satisfies 1a. Note that λ(0, 2, 4, 6) = (0, 4, 0, 4) if λ = 2 and λ(0, 2, 4, 6) is a permutation of (0, 2, 4, 6) if λ ∈ {1, 3}. Therefore, by Lemma 2.5, v3 satisfies Property 1a, and so does v. Case 2: Assume that o(v) = 4. We have two subcases: when o(z) = 4 and λ ∈ {0, 1, 2, 3}, and when o(z) = 2 and λ ∈ {1, 3}. For the first subcase, since o(z) = 4, o(u) = 4. By induction hypothesis, u satisfies Property 2a or 2b. Assume that u satisfies Property 2a. Then, u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 4t1 +t2 −1 times and 4t1 +t2 −1 − 2t1 +t2 −1 times the element 0, and u3 is a permutation of (µ, .m. ., µ, 4Z8 , . n. ., 4Z8 , 2Z8 \4Z8 , . r. ., 2Z8 \4Z8 ) for some integers m, n, r ≥ 0 and µ ∈ {2, 6}. Note that, in this case, x1 = 0 by Item 2 of Lemma 2.8. If λ = 0, then it is easy to see that v satisfies Property 2a. If λ = 2, we show that v satisfies Property 2a. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ = 2, we have that v1 = 0. ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 17 From (21), v2 = (x1 , u2 , u2 , u2 , u2 ) + (2, 0, 2, 0, 2), where x1 = 0 is of length 2t1 +t2 . Note that u2 + 2 contains the element in 2Z4 \{0} = {2} as many times as u2 contains the element 0, and the element 0 as many times as u2 contains the element 2. Thus, v2 contains the element in 2Z4 \{0} = {2} exactly 2t1 +t2 + 2(4t1 +t2 −1 ) + 2(4t1 +t2 −1 − 2t1 +t2 −1 ) = 4t1 +t2 times and 2(4t1 +t2 −1 ) + 2(4t1 +t2 −1 − 2t1 +t2 −1 ) = 4t1 +t2 − 2t1 +t2 times the element 0, so v2 satisfies Property 2a. From (21), v3 = (u3 , u3 , u3 , u3 ) + (0, 4, 0, 4). By Item 2 of Lemma 2.6, v3 is a permutation of (4Z8 , .4n . ., 4Z8 , 2Z8 \4Z8 , 4r+2m . . . , 2Z8 \4Z8 ). Therefore, for λ = 2, v satisfies Property 2a. Finally, if λ ∈ {1, 3}, we show that v satisfies Property 2b. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ ∈ {1, 3}, we have that v1 contains every element of Z2 the same number of times. From (21), v2 = (x1 , u2 , u2 , u2 , u2 )+λ(1, 0, 1, 2, 3), where x1 = 0 is of length 2t1 +t2 . Since λ ∈ {1, 3}, by Lemma 2.3, we have that v2 is a permuta- t +t tion of (λ, 2 .1. . 2 , λ, Z4 , .α.2., Z4 ). From (21), v3 = (u3 , u3 , u3 , u3 )+λ(0, 2, 4, 6). Note that, for λ ∈ {1, 3}, λ(0, 2, 4, 6) is a permutation of (0, 2, 4, 6). Thus, by Item 1 of Lemma 2.6, v3 satisfies Property 2b, and so does v. There- fore, if o(u) = 4 and u satisfies Property 2a, we have that v satisfies either Property 2a or 2b. We continue with the first subcase, when o(z) = 4 and λ ∈ {0, 1, 2, 3}. Again, we have that o(u) = 4. Now, we assume that u satisfies Property 2b. Then, u1 contains every element of Z2 the same number of times, u2 is a permutation of (µ, .m. ., µ, 2Z4 , . n. ., 2Z4 , Z4 \2Z4 , . r. ., Z4 \2Z4 ) for some integers m, n, r ≥ 0 and µ ∈ {1, 3}, and u3 is a permutation of ′ (4Z8 , . t. ., 4Z8 , 2Z8 \4Z8 , . t. ., 2Z8 \4Z8 ) for some integers t, t′ ≥ 0. Note that, t +t −1 in this case, x1 is a permutation of (2Z4 , 2 1. . 2. , 2Z4 ) by Item 2 of Lemma 2.8. Now, we show that v satisfies Property 2b. Since v1 = (u1 , u1 ) + λ(0, 1) and u1 contains every element of Z2 the same number of times, we have that v1 contains every element of Z2 the same number of times, for any λ ∈ {0, 1, 2, 3}. From (21), v2 = (x1 , u2 , u2 , u2 , u2 )+λ(1, 0, 1, 2, 3). If λ = 0, it is clear that v2 satisfies Property 2b. Note that x1 +λ1 is a permutation of t +t −1 t +t −1 (2Z4 , 2 1. . 2. , 2Z4 ) if λ = 2, and a permutation of (Z4 \2Z4 , 2 1. . 2. , Z4 \2Z4 ) if λ ∈ {1, 3}. If λ = 2, then by Lemma 2.4, (u2 , u2 , u2 , u2 ) + (0, 2, 0, 2) is a permutation of (2Z4 , .4n . ., 2Z4 , Z4 \2Z4 , 4r+2m . . . , Z4 \2Z4 ). If λ ∈ {1, 3}, then by Lemma 2.3, (u2 , u2 , u2 , u2 ) + λ(0, 1, 2, 3) is a per- mutation of (Z4 , .α.2., Z4 ). Therefore, v2 satisfies Property 2b. From (21), v3 = (u3 , u3 , u3 , u3 ) + λ(0, 2, 4, 6). If λ = 0, it is clear that v3 satisfies Prop- erty 2b. Note that λ(0, 2, 4, 6) is a permutation of (0, 2, 4, 6) if λ ∈ {1, 3}, and λ(0, 2, 4, 6) = (0, 4, 0, 4) if λ = 2. Therefore, by Lemma 2.6, v3 satisfies Property 2b, and so does v. 18 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA Now, we consider the second subcase when o(v) = 4, that is, when o(z) = 2 and λ ∈ {1, 3}. Since o(z) = 2, o(u) = 2. By induction hypothesis, u satisfies Property 3a or 3b. Assume that u satisfies Property 3a. Then, u1 = 0, u2 = 0, and u3 contains the element in 4Z8 \{0} = {4} exactly m = 8t1 −1 4t2 times and m′ = 8t1 −1 4t2 − 4t1 +t2 −1 times the element 0. By Item 3 of Lemma 2.8, we have that x1 = 0. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ ∈ {1, 3}, we have that v1 contains every element of Z2 the same number of times. From (21), v2 = (x1 , u2 , u2 , u2 , u2 ) + λ(1, 0, 1, 2, 3), where x1 = 0 is of length 2t1 +t2 . By Lemma 2.3, we have that v2 is a permutation of t +t (λ, 2 .1. . 2 , λ, Z4 , .α.2., Z4 ), where λ ∈ {1, 3}. From (21), v3 = (u3 , u3 , u3 , u3 ) + λ(0, 2, 4, 6). Note ′ ′ that u3 is a permutation of (4, m−m . . . , 4, 4Z8 , .m. ., 4Z8 ) and, since λ ∈ {1, 3}, λ(0, 2, 4, 6) is a permutation of (0, 2, 4, 6). Thus, by Item 1 of Lemma 2.2, ′ v3 = (u3 , u3 , u3 , u3 ) + (0, 2, 4, 6) is a permutation of (2Z8 , m+m . . . , 2Z8 ), so v3 satisfies Property 2b, and so does v. Therefore, if o(u) = 2 and u satisfies Property 3a, we have that v satisfies Property 2b. We continue with the second subcase, when o(z) = 2 and λ ∈ {1, 3}. Again, we have that o(u) = 2. Now, we assume that u satisfies Property 3b. Then, u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 4t1 +t2 −1 times and 4t1 +t2 −1 − 2t1 +t2 −1 times the element 0, and u3 is a permutation of (4Z8 , .m. ., 4Z8 ) for some m ≥ 0. By Item 3 of Lemma 2.8, we have that x1 = 0. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ ∈ {1, 3}, we have that v1 contains every element of Z2 the same number of times. From (21), v2 = (x1 , u2 , u2 , u2 , u2 ) + λ(1, 0, 1, 2, 3), where x1 = 0 is of length 2t1 +t2 . By Lemma 2.3, we have that v2 is a permutation of t +t (λ, 2 .1. . 2 , λ, Z4 , .α.2., Z4 ), where λ ∈ {1, 3}. From (21), v3 = (u3 , u3 , u3 , u3 ) + λ(0, 2, 4, 6). Since λ ∈ {1, 3}, λ(0, 2, 4, 6) is a permutation of (0, 2, 4, 6). Thus, by Item 1 of Lemma 2.2, v3 = (u3 , u3 , u3 , u3 ) + (0, 2, 4, 6) is a permutation of (2Z8 , .2m.. , 2Z8 ). Therefore, v3 satisfies Property 2b, and so does v. Case 3: Assume that o(v) = 2. Then, o(z) = 2 and λ ∈ {0, 2}. Since o(z) = 2, we have that o(u) = 2 and, by Item 3 of Lemma 2.8, x1 = 0. By induction hypothesis, u satisfies Property 3a or 3b. Assume that u satisfies Property 3a. Then, u1 = 0, u2 = 0, and u3 contains the element in 4Z8 \{0} = {4} exactly m = 8t1 −1 4t2 times and m′ = 8t1 −1 4t2 − 4t1 +t2 −1 times the element 0. If λ = 0, then v = (0 | 0 | v3 ) satisfies Property 3a, since v3 contains 4m times the element 4 and 4m′ the element 0. Now, we assume that λ = 2. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ = 2, we have that v1 = 0. From (21), v2 = (x1 , u2 , u2 , u2 , u2 ) + (2, 0, 2, 0, 2), where x1 = 0 is of length 2t1 +t2 and u2 = 0. Therefore, v2 contains the element in 2Z4 \{0} = {2} exactly α1 + 2α2 = 4t1 +t2 times and 2α2 = 4t1 +t2 − 2t1 +t2 times the element 0, by (20). From (21), v3 = (u3 , u3 , u3 , u3 ) + (0, 4, 0, 4). ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 19 Note that u3 is a permutation of ′ ′ (4, m−m . . . , 4, 4Z8 , .m. ., 4Z8 ). ′ Thus, by Item 1 of Lemma 2.2, v3 is a permutation of (4Z8 , 2m+2m . . . , 4Z8 ), so v3 satisfies Property 3b, and so does v. Therefore, if o(u) = 2 and u satisfies Property 3a, we have that v satisfies Property 3b. We continue with the case when o(z) = 2 and λ ∈ {0, 2}. Again, we have that o(u) = 2 and x1 = 0. Now, we assume that u satisfies Property 3b. Then, u1 = 0, u2 contains the element in 2Z4 \{0} = {2} exactly 4t1 +t2 −1 times and 4t1 +t2 −1 − 2t1 +t2 −1 times the element 0, and u3 is a permutation of (4Z8 , .m. ., 4Z8 ) for some m ≥ 0. If λ = 0, then it is easy to see that v satisfies Property 3b. Now, we assume that λ = 2. Since v1 = (u1 , u1 ) + λ(0, 1), u1 = 0, and λ = 2, we have that v1 = 0. From (21), v2 = (x1 , u2 , u2 , u2 , u2 ) + (2, 0, 2, 0, 2), where x1 = 0 is of length 2t1 +t2 . Note that u2 + 2 contains the element in 2Z4 \{0} = {2} as many times as u2 contains the element 0, and the element 0 as many times as u2 contains the element 2. Therefore, v2 contains the element in 2Z4 \{0} = {2} exactly 2t1 +t2 + 2(4t1 +t2 −1 ) + 2(4t1 +t2 −1 − 2t1 +t2 −1 ) = 4t1 +t2 times and 2(4t1 +t2 −1 ) + 2(4t1 +t2 −1 − 2t1 +t2 −1 ) = 4t1 +t2 − 2t1 +t2 times the element 0. From (21), v3 = (u3 , u3 , u3 , u3 ) + (0, 4, 0, 4). By Item 1 of Lemma 2.2, v3 is a permutation of (4Z8 , .4m . ., 4Z8 ). Therefore, v3 satisfies Property 3b, and so does v. This completes the proof. □ From [6], related to the generalized Gray map (1) considered in this paper, we have the following results: Lemma 2.11. [6] Let λ, µ ∈ Z2 . Then, ϕs (λµ2s−1 ) = λϕs (µ2s−1 ) = λµϕs (2s−1 ). Lemma 2.12. [6] Let u, v ∈ Z2s . Then, ϕs (2s−1 u + v) = ϕs (2s−1 u) + ϕs (v). Proposition 2.2. [14, 6] Let u, v ∈ Z2s . Then, dH (ϕs (u), ϕs (v)) = wtH (ϕs (u − v)). By Proposition 2.2, the Z2 Z4 Z8 -linear codes obtained from the Gray map Φ are distance invariant, that is, the Hamming weight distribution is invari- ant under translation by a codeword. Therefore, their minimum distance coincides with the minimum weight. Proposition 2.3. Let t1 ≥ 1 and t2 ≥ 0 be integers. The Z2 Z4 Z8 -additive code Ht1 ,t2 ,1 , generated by At1 ,t2 ,1 , is a Z2 Z4 Z8 -additive Hadamard code. Proof. Let Ht1 ,t2 ,1 be the Z2 Z4 Z8 -additive code of type (α1 , α2 , α3 ; t1 , t2 , 1) and H t1 ,t2 ,1 be the corresponding Z2 Z4 Z8 -linear code of length N . We have that N = α1 + 2α2 + 4α3 . The cardinality of H t1 ,t2 ,1 is 8t1 · 4t2 · 2 = 2(α1 + 2α2 + 4α3 ) = 2N by Lemma 2.1. By Proposition 2.2, the minimum distance of H t1 ,t2 ,1 is equal to the minimum weight of H t1 ,t2 ,1 . Therefore, we need to prove that the minimum weight of H t1 ,t2 ,1 is N/2. 20 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA We can write that Ht1 ,t2 ,1 = G t1 ,t2 ,1 ∪ (G t1 ,t2 ,1 + (1 | 2 | 4)). By Lemma 2.12, H t1 ,t2 ,1 = Φ(G t1 ,t2 ,1 ) ∪ (Φ(G t1 ,t2 ,1 ) + 1). Let u = (u1 | u2 | u3 ) ∈ Ht1 ,t2 ,1 \{0, (1 | 2 | 4)}. We show that wtH (Φ(u)) = N/2. First, consider u ∈ G t1 ,t2 ,1 \{0}. If o(u) = 8, then by Lemma 2.10, u1 contains every element of Z2 the same number of times, and for i ∈ {2, 3}, ui contains every element of 2i−1 Z2i exactly si times, si ≥ 0, and the remaining αi − 2si coordinates of ui are from Z2i \2i−1 Z2i . Thus, from the definition of Φ, we have that wtH (Φ(u)) = α1 /2 + 2s2 + (α2 − 2s2 ) · 1 + 4s3 + (α3 − 2s3 ) · 2 = α1 /2 + α2 + 2α3 = N/2. If o(u) = 4, then u satisfies Property 2a or 2b given in Lemma 2.10. If u satisfies Property 2a, then u3 contains every element of 4Z8 exactly m times, m ≥ 0, and the remaining coordinates of u3 are from Z8 \4Z8 . Thus, wtH (Φ(u)) = α1 /2 + α2 + 4m + (α3 − 2m) · 2 = α1 /2 + α2 + 2α3 = N/2. Otherwise, if u satisfies Property 2b, then wtH (Φ(u)) = α1 /2 + 2n + (α2 − 2n) · 1 + 4t + (α3 − 2t) · 2 = N/2. If o(u) = 2, then u satisfies Property 3a or 3b given in Lemma 2.10. If u satisfies Property 3a, then wtH (Φ(u)) = 41 (α1 /2 + α2 + 2α3 ) · 4 = N/2. Otherwise, if u satisfies Property 3b, then \ = 2 · 21 (α1 /2 + α2 ) + 4m + (α3 − 2m) · 2 = N/2. Finally, note that wtH (Φ(u) + 1) = N/2. Therefore, we have that the weight of every element of H t1 ,t2 ,1 \{0, 1} is N/2, that is, the minimum weight of H t1 ,t2 ,1 is N/2. □ Proposition 2.4. Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. If Ht1 ,t2 ,t3 is a Z2 Z4 Z8 -additive Hadamard code of type (α1 , α2 , α3 ; t1 , t2 , t3 ), then, by applying Construction (5), Ht1 ,t2 ,t3 +1 is a Z2 Z4 Z8 -additive Hadamard code of type (2α1 , 2α2 , 2α3 ; t1 , t2 , t3 + 1). Proof. By Construction (5), Ht1 ,t2 ,t3 +1 is a Z2 Z4 Z8 -additive code of type (α1′ , α2′ , α3′ ; t1 , t2 , t3 + 1), where α1′ = 2α1 , α2′ = 2α2 , and α3′ = 2α3 . Since H t1 ,t2 ,t3 is a Hadamard code of length N = α1 + 2α2 + 4α3 , then its minimum distance is N/2 and |H t1 ,t2 ,t3 | = 2N . Note that H t1 ,t2 ,t3 +1 is a Z2 Z4 Z8 -linear code of length N ′ = α1′ + 2α2′ + 4α3′ = 2N and |H t1 ,t2 ,t3 +1 | = 8t1 4t2 2t3 +1 = 2|H t1 ,t2 ,t3 | = 2 · 2N = 2N ′ . By Proposition 2.2, the minimum distance of H t1 ,t2 ,t3 +1 is equal to the minimum weight of H t1 ,t2 ,t3 +1 . We only have to prove that the minimum weight of H t1 ,t2 ,t3 +1 is N ′ /2. Let Ht1 ,t2 ,t3 = (H1 | H2 | H3 ). Note that [ Ht1 ,t2 ,t3 +1 = ((H1 , H1 | H2 , H2 | H3 , H3 ) + λ(0, 1 | 0, 2 | 0, 4)). λ∈{0,1} By Lemmas 2.11 and 2.12, [ H t1 ,t2 ,t3 +1 = (Φ(H1 , H1 | H2 , H2 | H3 , H3 ) + λ(0, 1, 0, 1, 0, 1)) λ∈{0,1} (22) = A0 ∪ A1 , where Aλ = Φ(H1 , H1 | H2 , H2 | H3 , H3 ) + λ(0, 1, 0, 1, 0, 1), λ ∈ {0, 1}. Next, we show that the minimum weight of Aλ is N ′ /2. Any element in Aλ is of the form Φ(u1 , u1 | u2 , u2 | u3 , u3 ) + λ(0, 1, 0, 1, 0, 1), for u = (u1 | u2 | ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 21 u3 ) ∈ (H1 | H2 | H3 ). Let u = (u1 | u2 | u3 ) ∈ (H1 | H2 | H3 )\{0}. When λ = 0, we have that wtH (Φ(u1 , u1 | u2 , u2 | u3 , u3 )) = 2wtH (Φ(u)). Thus, the minimum weight of A0 is 2 · N/2 = N ′ /2. Otherwise, when λ = 1, we have that wtH (Φ(u1 , u1 | u2 , u2 | u3 , u3 ) + (0, 1, 0, 1, 0, 1)) = wtH (Φ(u)) + α1 −wtH (u1 )+2α2 −wtH (Φ2 (u2 ))+4α3 −wtH (Φ3 (u3 )) = wtH (Φ(u))+α1 + 2α2 + 4α3 − wtH (Φ(u)) = N = N ′ /2. Thus, the minimum weight of A1 is N ′ /2. Therefore, from (22), the minimum weight of H t1 ,t2 ,t3 +1 is N ′ /2. □ Next, from Proposition 2.3 and Proposition 2.4, one can derive the result below. Theorem 2.1. Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. The Z2 Z4 Z8 - additive code Ht1 ,t2 ,t3 , generated by At1 ,t2 ,t3 , is a Z2 Z4 Z8 -additive Hadamard code. To illustrate, we present an example. Example 2.2. The Z2 Z4 Z8 -additive code H1,0,1 generated by A1,0,1 , given in (2), is a Z2 ZS4 Z8 -additive Hadamard code of type (2, 1, 1; 1, 0, 1). We can write H1,0,1 = α∈Z2 (A + α1), where A = {λ(0, 1 | 1 | 1) : λ ∈ Z8 }. Thus, H 1,0,1 = Φ(H1,0,1 ) = α∈Z2 (Φ(A)+α1), where Φ(A) consists of all the rows S of the Hadamard matrix   0 0 0 0 0 0 0 0  0 1 0 1 0 1 0 1     0 0 1 1 0 0 1 1     0 1 1 0 0 1 1 0  H(2, 4) =  .  0 0 0 0 1 1 1 1    0 1 0 1 1 0 1 0     0 0 1 1 1 1 0 0  0 1 1 0 1 0 0 1 Note that Φ(A) is linear and the minimum distance of Φ(A) is 4, so H 1,0,1 is a binary linear Hadamard code of length 8. Proposition 2.5. Let t1 ≥ 1, t2 ≥ 0, and t3 ≥ 1 be integers. Let H t1 ,t2 ,t3 be a Z2 Z4 Z8 -linear Hadamard code of length 2t . Then, t + 1 = 3t1 + 2t2 + t3 . Proof. Since H t1 ,t2 ,t3 is a binary Hadamard code of length 2t , we have that |H t1 ,t2 ,t3 | = 2 · 2t = 2t+1 . Note that |H t1 ,t2 ,t3 | = 23t1 +2t2 +t3 , and hence t + 1 = 3t1 + 2t2 + t3 . □ Now, we recall Theorem 2.2 in order to compare the Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 (with α1 ̸= 0, α2 ̸= 0 and α3 ̸= 0) with the Z2 Z4 -linear Hadamard codes (with α1 ̸= 0, α2 ̸= 0) of the same length. Also recall that the type of a Z2 Z4 -linear code can be given as (α1 , α2 , 0; 0, t2 , t3 ) if we see the code as a Z2 Z4 Z8 -linear code with α3 = 0, or directly (α1 , α2 ; t2 , t3 ). Note that there are no Z2 Z4 Z8 -linear Hadamard codes neither with only α1 = 0 nor with only α2 = 0 [24, 33]. 22 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA Theorem 2.2. [28] Let t ≥ 3 and t2 ∈ {0, . . . , ⌊t/2⌋}. Let H t2 ,t3 be the nonlinear Z2 Z4 -linear Hadamard code of length 2t and type (α1 , α2 ; t2 , t3 ), where α1 = 2t−t2 , α2 = 2t−1 − 2t−t2 −1 , and t3 = t + 1 − 2t2 . Then,   t2 rank(H t2 ,t3 ) = t3 + 2t2 + and ker(H t2 ,t3 ) = t2 + t3 . 2 We also recall the construction of the Z2s -linear Hadamard codes with s ≥ 2 studied in [16], and Theorem 2.3 given in [18], in order to compare these codes with the Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 (with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0) of the same length. Let Ti = {j·2i−1 : j ∈ {0, 1, . . . , 2s−i+1 −1}} for all i ∈ {1, . . . , s}. Note that T1 = {0, . . . , 2s −1}. Let t1 , t2 ,. . . ,ts be non- negative integers with t1 ≥ 1. Consider the matrix Āt1 ,...,ts whose columns are exactly all the vectors of the form zT , z ∈ {1}×T1t1 −1 ×T2t2 ×· · ·×Tsts . Let H̄t1 ,...,ts be the Z2s -additive code of type (n; t1 , . . . , ts ) generated by Āt1 ,...,ts . Let H̄ t1 ,...,ts = Φs (H̄t1 ,...,ts ) be the corresponding Z2s -linear Hadamard code. Theorem 2.3. [18] Let H̄ t1 ,...,ts be the Z2s -linear Hadamard code, with s ≥ 2 and ts ≥ 1. Then, for all ℓ ∈ {1, . . . , ts }, H̄ t1 ,...,ts is permutation equivalent ℓ−1 to the Z2s+ℓ -linear Hadamard code H̄ 1,0 ,t1 −1,t2 ,...,ts−1 ,ts −ℓ . For 5 ≤ t ≤ 11, Tables 1 and 3 given in [16] show all possible values of (t1 , . . . , ts ) corresponding to nonlinear Z2s -linear Hadamard codes, with s ≥ 2, of length 2t . For each of them, the values (r, k) are shown, where r is the rank, and k is the dimension of the kernel. Note that if two codes have different values (r, k), they are not equivalent. The following example shows that all the nonlinear Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 of length 211 are not equivalent to each other, nor to any Z2 Z4 -linear Hadamard code, nor to any Z2s -linear Hadamard code [16], with s ≥ 2, of the same length 211 . Example 2.3. Consider t = 11. By solving equation t + 1 = 3t1 + 2t2 + t3 given in Proposition 2.5, all Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 of length 211 are the ones in T = {H 1,0,9 , H 1,1,7 , H 1,2,5 , H 1,3,3 , H 1,4,1 , H 2,0,6 , H 2,1,4 , H 2,2,2 , H 3,0,3 , H 3,1,1 }. By using the computer algebra system Magma [13], their corresponding val- ues of (r, k), where r is the rank and k is the dimension of the kernel, are (12, 12), (14, 9), (17, 8), (21, 7), (26, 6), (17, 8), (22, 7), (28, 6), (28, 6), and (37, 5), respectively. The code H 1,0,9 is the only linear code in T since r = k = 12. Using Magma, we can check that the following codes in each pair are nonequivalent to each other: (H 1,2,5 , H 2,0,6 ), (H 2,2,2 , H 3,0,3 ). Therefore, the codes in T are not equivalent to each other. Let T̄ = T \ {H 1,0,9 }. Similarly, by solving equation t + 1 = 2t2 + t3 given in Theorem 2.2, all nonlinear Z2 Z4 -linear Hadamard codes of length 211 are H 2,8 , H 3,6 , H 4,4 and H 5,2 , and by Theorem 2.2, their corresponding values of (r, k) are (13, 10), (15, 9), (18, 8), and (22, 7), respectively. Using Magma, we can check that H 2,1,4 and H 5,2 are nonequivalent. Therefore, ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 23 all the codes in T̄ are nonequivalent to any Z2 Z4 -linear Hadamard code of length 211 . Finally, note that all the codes in T̄ , except H 1,1,7 and H 2,1,4 , are not equivalent to any Z2s -linear Hadamard code, with s ≥ 2, of length 211 , since they have different values of (r, k). The Z2s -linear Hadamard codes of length 211 , having the same values (r, k) = (14, 9) as H 1,1,7 , are H̄ 2,0,6 , H̄ 1,1,0,5 , H̄ 1,0,1,0,4 , H̄ 1,0,0,0,1,0,2 , and H̄ 1,0,0,0,0,0,1,0,0 , which are equivalent to each other by Theorem 2.3. The Z4 -linear Hadamard code H̄ 6,0 is the only Z2s -linear Hadamard code of length 211 , having the same values (r, k) = (22, 7) as H 2,1,4 . However, using Magma, we can check that the following codes in each pair are nonequivalent to each other: (H 1,1,7 , H̄ 2,0,6 ), (H 2,1,4 , H̄ 6,0 ). Therefore, all the nonlinear Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 of length 211 are not equivalent to each other, nor to any Z2 Z4 -linear Hadamard code, nor to any Z2s -linear Hadamard code [16], with s ≥ 2, of the same length 211 . Finally, the following example shows that other Z2 Z4 Z8 -linear Hadamard codes can not be constructed by Construction (3). However, in the next section, we also show that other constructions of these codes do generate equivalent codes. Example 2.4. Consider the matrix   11 11 22 2222 4444 44444444 B =  01 01 02 1111 0646 11113333  . 00 11 31 0123 1771 01234725 Using Magma, we can check that the code generated by B is a Z2 Z4 Z8 -linear Hadamard code of type (4, 6, 12; 2, 0, 1), and it is nonequivalent to the code H 2,0,1 generated by A2,0,1 given in (6). 3. Same type equivalent Z2 Z4 Z8 -linear Hadamard codes In this section, we see that if we consider other specific starting matri- ces, instead of the matrix A1,0,1 given in (2), and apply the same recursive Construction (3), (4) and (5), or new constructions more general than (3) and (4), and the same Construction (5), we also obtain Z2 Z4 Z8 -additive Hadamard codes with α1 ̸= 0, α2 ̸= 0 and α3 ̸= 0. Indeed, the corre- sponding Z2 Z4 Z8 -linear Hadamard codes, after applying the Gray map Φ, are equivalent to the codes Φ(Ht1 ,t2 ,t3 ) of the same type constructed in Sec- tion 2. Let Z∗2i be the group of units of Z2i for i ∈ {2, 3}. Then, Z∗4 = {1, 3} and Z∗8 = {1, 3, 5, 7}. Proposition 3.1. Let ā1 = (a1 ) and b̄1 = (b1 ), where a1 ∈ Z∗4 and b1 ∈ Z∗8 . Then, the code generated by   1 1 2 4 (23) Â1,0,1 = , ā1 ,b̄1 0 1 a1 b1 24 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA denoted by Ĥā1,0,1 ,b̄ , is a Z2 Z4 Z8 -additive Hadamard code of type (2, 1, 1; 1, 0, 1). 1 1 Moreover, the corresponding Z2 Z4 Z8 -linear Hadamard code Φ(Ĥā1,0,1 ) is per- 1 ,b̄1 mutation equivalent to Φ(H 1,0,1 ). 1,0,1 Proof. Let Aā1 ,b̄1 be the matrix obtained from Âā1,0,1 by applying the row 1 ,b̄1 operation described in Table 1, depending on the values of a1 ∈ Z∗4 and b1 ∈ 1,0,1 Z∗8 . Note that Aā1 ,b̄1 is also a generator matrix of Ĥā1,0,1 ,b̄ . After permuting 1 1 1,0,1 the first two columns of Aā1 ,b̄1 , if necessary, we obtain A1,0,1 . Thus, Ĥā1,0,1 ,b̄ 1 1 and H1,0,1 are permutation equivalent, and so are the codes Φ(Ĥā1,0,1 ) and 1 ,b̄1 Φ(H 1,0,1 ). □ Theorem 3.1. Let ℓ ≥ 1. Let āℓ = (a1 , . . . , aℓ ) ∈ (Z∗4 )ℓ , b̄ℓ = (b1 , . . . , bℓ ) ∈ (Z∗8 )ℓ , ai = (ai , 2. . . , ai ), and bi = (bi , 4. . . , bi ), 1 ≤ i ≤ ℓ. Let Âāt1 ,0,1 i−1 i−1 ,b̄ , t1 t1 with t1 ≥ 1, be the matrix obtained by using the following construction (in- stead of Construction (3)). We start with Âā1,0,1 ,b̄ given in (23). If we have 1 1 Âℓ−1,0,1 ā ,b̄ = (Â1 | Â2 | Â3 ), with ℓ ≥ 2, we may construct ℓ−1 ℓ−1   Â1 Â1 M̂1 Â2 Â2 Â2 Â2 M̂2 Â3 Â3 ··· Â3 (24) Âāℓ,0,1 = , ℓ ,b̄ ℓ 0 1 aℓ 0 1 2 3 bℓ 0 1 ··· 7 where M̂1 = {zT : z ∈ {2}×{0, 2}ℓ−1 }, M̂2 = {zT : z ∈ {4}×{0, 2, 4, 6}ℓ−1 }. We repeat Construction (24) until ℓ = t1 . Then, the code generated by Âtā1 ,0,1 ,b̄ , denoted by Ĥāt1 ,0,1 ,b̄ , is a Z2 Z4 Z8 -additive Hadamard code of type t1 t1 t1 t1 (α1 , α2 , α3 ; t1 , 0, 1) with α1 ̸= 0, α2 ̸= 0 and α3 ̸= 0. Moreover, the corre- sponding Z2 Z4 Z8 -linear Hadamard code Φ(Ĥāt1 ,0,1 ,b̄ ) is permutation equiva- t1 t1 lent to Φ(Ht1 ,0,1 ). Proof. It is enough to show that Ĥāt1 ,0,1 and Ht1 ,0,1 are permutation equiv- t1 ,b̄t1 alent. We prove this by induction on t1 ≥ 1. By Proposition 3.1, this is true for t1 = 1. Assume that Ĥāt1 ,0,1 ,b̄ and Ht1 ,0,1 are permutation equivalent. Let t1 t1 Âtā1 ,0,1 = (Â1 | Â2 | Â3 ) and At1 ,0,1 = (A1 | A2 | A3 ). By Construction (24), t1 ,b̄t1 we have   t1 +1,0,1 Â1 Â1 M̂1 Â2 Â2 Â2 Â2 M̂2 Â3 Â3 · · · Â3 Âā ,b̄ = 0 1 a 0 1 2 3 b 0 1 ··· 7 , t1 +1 t1 +1 t1 +1 t1 +1 where M̂1 = {zT : z ∈ {2} × {0, 2}t1 }, M̂2 = {zT : z ∈ {4} × {0, 2, 4, 6}t1 }, t t at1 +1 = (at1 +1 , .2.1., at1 +1 ), and bt1 +1 = (bt1 +1 , .4.1., bt1 +1 ). By Construction (3), we have   A1 A1 M1 A2 A2 A2 A2 M2 A3 A3 · · · A3 At1 +1,0,1 = 0 1 1 0 1 2 3 1 0 1 ··· 7 , ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 25 where M1 = {zT : z ∈ {2} × {0, 2}t1 }, M2 = {zT : z ∈ {4} × {0, 2, 4, 6}t1 }. Let Ĥāt1 +1,0,1 ,b̄ and Ht1 +1,0,1 be the codes generated by Âtā1 +1,0,1 ,b̄ and t1 +1 t1 +1 t1 +1 t1 +1 At1 +1,0,1 , respectively. Since Ĥāt1 ,0,1 and Ht1 ,0,1 are permutation equivalent, there exist some row t1 ,b̄t1 operations and column permutations so that after applying these operations on (Â1 | Â2 | Â3 ), we obtain (A1 | A2 | A3 ). First, we apply the same row operations to Âtā1 +1,0,1 and the corresponding column permutations t1 +1 ,b̄t1 +1 to each submatrix   Âi , ki for i ∈ {1, 2, 3}, ki ∈ Z2i . Thus, for i ∈ {1, 2, 3}, Âi becomes Ai . Then, we change the last row by applying the row operation described in Table 1, depending on the values of at1 +1 ∈ Z∗4 and bt1 +1 ∈ Z∗8 . After that, we permute the blocks of the form       A1 A2 A3 , and , k1 k2 k3 for ki ∈ Z2i , so that we obtain the submatrices       A1 A1 A2 A2 A2 A2 A3 A3 · · · A3 , and , 0 1 0 1 2 3 0 1 ··· 7 t +1,0,1 respectively. Let Aā1t be the matrix obtain from Âtā1 +1,0,1 after 1 +1 ,b̄t1 +1 ,b̄ t1 +1 t1 +1 applying all these operations. Let M1′ and M2′ be the matrices M̂1 and M̂2 , respectively, after all these operations. Finally, after a suitable permutation of the columns corresponding to the blocks of the form M1′ M2′     and 1 1 t +1,0,1 in Aā1t +1 ,b̄t +1 , we obtain At1 +1,0,1 . Thus, the codes Ĥāt1 +1,0,1 and Ht1 +1,0,1 1 1 t1 +1 ,b̄t1 +1 are permutation equivalent, and so are the corresponding Z2 Z4 Z8 -linear codes. This completes the proof. □ Example 3.1. Let ā2 = (1, 3) and b̄2 = (3, 5). Then,   11 11 22 2222 4444 44444444 2,0,1 Âā ,b̄ = 01 01  02 a1 0246 b1  2 2 00 11 a2 0123 b2 01234567   11 11 22 2222 4444 44444444 = 01 01  02 1111 0246 33333333  , 00 11 33 0123 5555 01234567 which is obtained by using Construction (24), starting with the matrix Âā1,0,1 1 ,b̄1 given in (23). 26 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA ai bi row operation 1 1 ri+1 ← ri+1 1 3 ri+1 ← r1 − ri+1 1 7 ri+1 ← 5r1 − 5ri+1 1 5 ri+1 ← 5ri+1 3 1 ri+1 ← r1 − 3ri+1 3 3 ri+1 ← 3ri+1 3 5 ri+1 ← r1 + ri+1 3 7 ri+1 ← 7ri+1 Table 1. Row operations depending on the values of ai ∈ Z∗4 and bi ∈ Z∗8 . First, note that we have     1,0,1 1 1 2 4 1,0,1 1 1 2 4 Âā ,b̄ = and A = . 1 1 0 1 1 3 0 1 1 1 Therefore, by using Table 1, A1,0,1 = (A1 | A2 | A3 ) can be obtained from Â1,0,1 ā1 ,b̄1 = (Â1 | Â2 | Â3 ) by applying the row operation r2 ← r1 − r2 and the column permutation (1, 2). No column permutation is performed on the submatrices Â2 and Â3 . Then, we apply the same row operationr2 ←  r1 −r2 2,0,1 Â1 to Âā ,b̄ and the column permutation (1, 2) to each submatrix , for 2 2 k1 k1 ∈ Z2 . Thus, for i ∈ {1, 2, 3}, Âi becomes Ai . Then, we apply r3 ← r1 +r3 , described in Table 1, so we obtain   11 11 22 2222 4444 44444444  01 01 20 1111 4206 11111111  . 11 00 11 2301 1111 45670123   Ai After that, we permute the blocks of the form , for ki ∈ Z2i and ki i ∈ {1, 2, 3}, so that we obtain   11 11 22 2222 4444 44444444 2,0,1 Aā2 ,b̄2 =  10 10 20 1111 4206 11111111  . 00 11 11 0123 1111 01234567 Finally, after applying a suitable column permutation to the submatrices,     22 4444  20  and  4206  11 1111 2,0,1 in Aā2 ,b̄2 , we can obtain A2,0,1 . Thus, the codes Ĥā2,0,1 ,b̄ and H2,0,1 are per- 2 2 mutation equivalent, which is equivalent to say that the codes Φ(Ĥā2,0,1 ) and 2 ,b̄2 Φ(H 2,0,1 ) are permutation equivalent. ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 27 Theorem 3.2. Let t1 ≥ 1, t2 ≥ 0 and ℓ ≥ 0. Let āt1 +ℓ = (a1 , . . . , at1 +ℓ ) ∈ t +i−1 (Z∗4 )t1 +ℓ , b̄t1 = (b1 , . . . , bt1 ) ∈ (Z∗8 )t1 , and at1 +i = (at1 +i , 2 1. . . , at1 +i ) for 0 ≤ i ≤ ℓ. Let Âtā1 ,t2 ,1 ,b̄ be the matrix obtained by using the following t1 +t2 t1 construction (instead of Construction (4)), starting with Âā1,0,1 ,b̄ given in (23). 1 1 If we have Âtā1 ,ℓ−1,1,b̄ = (Â1 | Â2 | Â3 ), with ℓ ≥ 1, we may construct t1 +ℓ−1 t1   Â1 Â1 M̂1 Â2 Â2 Â2 Â2 Â3 Â3 Â3 Â3 (25) Âtā1 ,ℓ,1 ,b̄t = , t1 +ℓ 1 0 1 at1 +ℓ 0 1 2 3 0 2 4 6 where M̂1 = {zT : z ∈ {2}×{0, 2}t1 +ℓ−1 }. We repeat Construction (25) until ℓ = t2 . Then, the code generated by Âtā1 ,t2 ,1 ,b̄ , denoted by Ĥāt1 ,t2 ,1 ,b̄ , is a t1 +t2 t1 t1 +t2 t1 Z2 Z4 Z8 -additive Hadamard code of type (α1 , α2 , α3 ; t1 , t2 , 1) with α1 ̸= 0, α2 ̸= 0 and α3 ̸= 0. Moreover, the corresponding Z2 Z4 Z8 -linear Hadamard code Φ(Ĥāt1 ,t2 ,1 ,b̄ ) is permutation equivalent to Φ(Ht1 ,t2 ,1 ). t1 +t2 t1 Proof. It is enough to show that Ĥāt1 ,t2 ,1 ,b̄ and Ht1 ,t2 ,1 are permutation t1 +t2 t1 equivalent. We prove this by induction on t2 ≥ 0. By Theorem 3.1, Ĥāt1 ,0,1 ,b̄ t1 t1 and Ht1 ,0,1 are permutation equivalent. Assume that Ĥāt1 ,t2 ,1 ,b̄ and Ht1 ,t2 ,1 , t1 +t2 t1 generated by Âtā1 ,t2 ,1 ,b̄ and At1 ,t2 ,1 , respectively, are permutation equiva- t1 +t2 t1 lent. We have that at1 +t2 +1 ∈ Z∗4 = {1, 3}. Let Ĥāt1 ,t2 +1,1,b̄ and Ht1 ,t2 +1,1 be t1 +t2 +1 t1 the codes generated by Âtā1 ,t2 +1,1,b̄ using Construction (25) and At1 ,t2 +1,1 t1 +t2 +1 t1 using Construction (4), respectively. Then, by the same arguments as in the proof of Theorem 3.1 and applying the row operation rt1 +t2 +1 ← −rt1 +t2 +1 if at1 +t2 +1 = 3, the codes Ĥāt1 ,t2 +1,1,b̄ and Ht1 ,t2 +1,1 are permutation equiv- t1 +t2 +1 t1 alent, and so are the corresponding Z2 Z4 Z8 -linear codes. This completes the proof. □ Theorem 3.3. t1 ≥ 1, t2 ≥ 0 and t3 ≥ 1. Let āt1 +t2 = (a1 , . . . , at1 +t2 ) ∈ (Z∗4 )t1 +t2 , b̄t1 = (b1 , . . . , bt1 ) ∈ (Z∗8 )t1 . Let Âtā1 ,t2 ,t3,b̄ be the matrix obtained t1 +t2 t1 by using Construction (5) in the following way, starting with Âā1,0,1 ,b̄ given in 1 1 (23). If we have Âtā1 ,t2 ,ℓ−1 ,b̄ , ℓ ≥ 2, we may construct Âtā1 ,t2 ,ℓ ,b̄ by Construc- t1 +t2 t1 t1 +t2 t1 tion (5). We repeat Construction (5) until ℓ = t3 . Then, the code generated by Âtā1 ,t2 ,t3,b̄ , denoted by Ĥāt1 ,t2 ,t3,b̄ , is a Z2 Z4 Z8 -additive Hadamard code t1 +t2 t1 t1 +t2 t1 of type (α1 , α2 , α3 ; t1 , t2 , t3 ) with α1 ̸= 0, α2 ̸= 0 and α3 ̸= 0. Moreover, the corresponding Z2 Z4 Z8 -linear Hadamard code Φ(Ĥāt1 ,t2 ,t3,b̄ ) is permutation t1 +t2 t1 equivalent to Φ(Ht1 ,t2 ,t3 ). Proof. We have that that Ĥāt1 ,t2 ,1 ,b̄ and Ht1 ,t2 ,1 are permutation equivalent t1 +t2 t1 by Theorem 3.2. Then, by the same arguments as in the proof of Theorem 28 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA 3.1, the codes Ĥāt1 ,t2 ,t3,+1 and Ht1 ,t2 ,t3 +1 are permutation equivalent and the t1 +t2 b̄t1 result follows. □ 4. Conclusions and further research In this paper, we give several recursive constructions of Z2 Z4 Z8 -linear Hadamard codes with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0. We show that they all al- low us to construct the same family of codes since they generate permutation equivalent codes. Moreover, from Example 2.3, we see that all the nonlinear Z2 Z4 Z8 -linear Hadamard codes H t1 ,t2 ,t3 of length 211 are not equivalent to each other, nor to any Z2 Z4 -linear Hadamard code, nor to any Z2s -linear Hadamard code [16], with s ≥ 2, of the same length 211 . Therefore, we have that some nonlinear Hadamard codes, without any known structure, now can be seen as the Gray map image of a Z2 Z4 Z8 -linear Hadamard codes with α1 ̸= 0, α2 ̸= 0, and α3 ̸= 0. As further research, it would be interesting to generalize this result, given only for 211 , to any length 2t . Another further research could be to generalize the given construction of Z2 Z4 Z8 -linear Hadamard codes to Z2 Z4 . . . Z2s -linear Hadamard codes with α1 , . . . , αs different to zero, or even to Zp Zp2 . . . Zps -linear generalized Hadamard codes with p prime. The study of Z2 Z4 Z8 -linear Hadamard codes may represent an important step to study the general case, and other papers [2, 36] have also focused on this particular case. However, the generalizations are not feasible using the same techniques employed in this paper. References [1] Edvard F Assmus and Jennifer D Key, Designs and their codes, Cambridge University Press, 1994. [2] I. Aydogdu and F. Gursoy, Z2 Z4 Z8 -additive codes, J. Appl. Math. Comput. 60 (2019), 327–341. [3] Heiko Bauer, Bernhard Ganter, and Ferdinand Hergert, Algebraic techniques for non- linear codes, Combinatorica 3 (1983), no. 1, 21–33. [4] Dipak Kumar Bhunia, Cristina Fernández-Córdoba, Carlos Vela, and Mercè Vil- lanueva, Equivalences among Zps -linear generalized Hadamard codes, preprint arxiv:2203.15407 (2022). [5] Dipak Kumar Bhunia, Cristina Fernández-Córdoba, and Mercè Villanueva, On the constructions of Zp Zp2 -linear generalized Hadamard codes, Finite Fields and Their Applications 83 (2022), 102093. [6] , On the linearity and classification of Zps -linear generalized Hadamard codes, Designs, Codes and Cryptography 90 (2022), 1037–1058. [7] , Linearity and classification of Zp Zp2 -linear generalized Hadamard codes, Fi- nite Fields and Their Applications 86 (2023), 102140. [8] , On Z2 Z4 Z8 -additive Hadamard codes, Proc. of IEEE International Sympo- sium on Information Theory (ISIT 2023), 25-30 June 2023, IEEE, 2023, pp. 276–281. [9] Ian F Blake, Codes over integer residue rings, Information and Control 29 (1975), no. 4, 295–300. [10] Joaquim Borges, Cristina Fernández-Córdoba, Jaume Pujol, Josep Rifà, and Mercè Villanueva, Z2 Z4 -linear codes: generator matrices and duality, Designs, Codes and Cryptography 54 (2010), no. 2, 167–179. ON RECURSIVE CONSTRUCTIONS OF Z2 Z4 Z8 -LINEAR HADAMARD CODES 29 [11] Joaquim Borges, Cristina Fernández-Córdoba, Jaume Pujol, Josep Rifà, and Mercè Villanueva, Z2 Z4 -linear codes, Springer, 2022. [12] Joaquim Borges, Cristina Fernández-Córdoba, and Josep Rifà, Every Z2k -code is a binary propelinear code, Electronic Notes in Discrete Mathematics 10 (2001), 100– 102. [13] Wieb Bosma, John J Cannon, C Fieker, and A Steel, Handbook of Magma functions, Edition 2.25 (2020). [14] Claude Carlet, Z2k -linear codes, IEEE Transactions on Information Theory 44 (1998), no. 4, 1543–1547. [15] Steven T Dougherty and Cristina Fernández-Córdoba, Codes over Z2k , Gray map and self-dual codes, Advances in Mathematics of Communications 5 (2011), no. 4, 571–588. [16] Cristina Fernández-Córdoba, Carlos Vela, and Mercè Villanueva, On Z2s -linear Hadamard codes: kernel and partial classification, Designs, Codes and Cryptogra- phy 87 (2019), no. 2-3, 417–435. [17] , On Z8 -linear Hadamard codes: rank and classification, IEEE Transactions on Information Theory 66 (2019), no. 2, 970–982. [18] , Equivalences among Z2s -linear Hadamard codes, Discrete Mathematics 343 (2020), no. 3, 111721. [19] A Roger Hammons, P Vijay Kumar, A Robert Calderbank, Neil JA Sloane, and Patrick Solé, The Z4 -linearity of Kerdock, Preparata, Goethals, and related codes, IEEE Transactions on Information Theory 40 (1994), no. 2, 301–319. [20] Th. Honold and Aleksandr Aleksandrovich Nechaev, Weighted modules and represen- tations of codes, Probl. Inf. Transm. 35 (1999), no. 3, 205–223. [21] K. J. Horadam, Hadamard matrices and their applications, Princeton University Press (2007). [22] J. F. Huang, C. C. Yang, and S. P. Tseng, Complementary Walsh-Hadamard coded optical CDMA coder/decoders structured over arrayed-waveguide grating routers, Opt. Commun. 229 (2004), 241–248. [23] Denis S Krotov, Z4 -linear Hadamard and extended perfect codes, Electronic Notes in Discrete Mathematics 6 (2001), 107–112. [24] , On Z2k -dual binary codes, IEEE Transactions on Information Theory 53 (2007), no. 4, 1532–1537. [25] Denis S Krotov and Mercè Villanueva, Classification of the Z2 Z4 -linear Hadamard codes and their automorphism groups, IEEE Transactions on Information Theory 61 (2015), no. 2, 887–894. [26] Florence Jessie MacWilliams and Neil James Alexander Sloane, The theory of error- correcting codes, Elsevier, 1977. [27] K. Nyberg, Perfect nonlinear S-boxes, EUROCRYPT-91 LNCS 547 (1991), 378–385. [28] Kevin T Phelps, Joseph Rifà, and Mercè Villanueva, On the additive (Z4 -linear and non-Z4 -linear) Hadamard codes: rank and kernel, IEEE transactions on information theory 52 (2006), no. 1, 316–319. [29] Josep Rifà, Faina Ivanovna Solov’eva, and Mercè Villanueva, On the intersection of Z2 Z4 -additive perfect codes, IEEE transactions on information theory 54 (2008), no. 3, 1346–1356. [30] Priti Shankar, On BCH codes over arbitrary integer rings, IEEE Transactions on Information Theory 25 (1979), no. 4, 480–483. [31] Minjia Shi, Thomas Honold, Patrick Solé, Yunzhen Qiu, Rongsheng Wu, and Zahra Sepasdar, The geometry of two-weight codes over Zpm , IEEE Transactions on Infor- mation Theory 67 (2021), no. 12, 7769–7781. [32] Minjia Shi, Zahra Sepasdar, Adel Alahmadi, and Patrick Solé, On two-weight Z2k - codes, Designs, Codes and Cryptography 86 (2018), no. 6, 1201–1209. 30 DIPAK K. BHUNIA, CRISTINA FERNÁNDEZ-CÓRDOBA, MERCÈ VILLANUEVA [33] Minjia Shi, Rongsheng Wu, and Denis S Krotov, On Zp Zpk -additive codes and their duality, IEEE Transactions on Information Theory 65 (2019), no. 6, 3841–3847. [34] E. D. J. Smith, R. J. Blaikie, and Taylor D. P., Performance enhancement of spectral- amplitude coding optical cdma using pulse-position modulation, IEEE Transactions on Communications 46 (1998), 1176–1185. [35] G. J. Yu, C. S. Lu, and H. Y. Liao, A message-based cocktail watermarking system, Pattern Recognition 36 (2003), 957–968. [36] Basri Çalnşkan and Kemal Balıkçi, Counting Z2 Z4 Z8 -additive codes, European Jour- nal of Pure and Applied Mathematics 12 (2019), no. 2, 668–679. Department of Information and Communications Engineering, Universitat Autònoma de Barcelona, 08193 Cerdanyola del Vallès, Spain. Email address: Dipak.Bhunia@uab.cat Email address: Cristina.Fernandez@uab.cat Email address: Merce.Villanueva@uab.cat