betaFeedback

WorksMathematics

kk-ary Legendre pairs

Abstract

We study kk-ary Legendre pairs and derive arithmetic restrictions on their existence and balance. For an odd prime pp, we determine the component sums of a pp-ary Legendre pair and show that, after normalization, each component has fixed symbol composition. As a consequence, every pp-ary Legendre pair of length ℓ\ell yields a Butson Hadamard matrix H(2p,2ℓ+2)H(2p,2\ell+2). For ternary Legendre pairs we combine fixed-content necklaces, integral-PAF symmetries, exact half-frequency restrictions, compression-decompression, and PSD tests. These reductions lead to ternary Legendre pairs for every admissible length ℓ≤32\ell\le32. We conjecture that ternary Legendre pairs exist for every admissible length.

Introduction

Let A=[a0,a1,…,aℓ−1]∈CℓA=[a_0,a_1,\ldots,a_{\ell-1}]\in\mathbb{C}^{\ell} be a finite complex sequence of length ℓ≥2\ell\ge2 periodically continued with period ℓ\ell. The periodic autocorrelation function PAF(A,s)PAF(A,s) of AA at lag ss is

PAF(A,s)=∑j=0ℓ−1ajaj+s‾,s=0,1,…,ℓ−1,PAF(A,s)=\sum_{j=0}^{\ell-1}a_j\overline{a_{j+s}},\qquad s=0,1,\ldots,\ell-1,

where b‾\overline{b} is the complex conjugate of b∈Cb\in\mathbb{C}. Two sequences A=[a0,a1,…,aℓ−1]A=[a_0,a_1,\ldots,a_{\ell-1}] and B=[b0,b1,…,bℓ−1]B=[b_0,b_1,\ldots,b_{\ell-1}] of length ℓ\ell form a Legendre pair (A,B)(A,B) if

PAF(A,s)+PAF(B,s)=−2,s=1,2,…,⌊ℓ2⌋.(1)PAF(A,s)+PAF(B,s)=-2,\qquad s=1,2,\ldots,\left\lfloor\frac{\ell}{2}\right\rfloor. \tag*{(1)}

Since PAF(A,ℓ−s)=PAF(A,s)‾PAF(A,\ell-s)=\overline{PAF(A,s)} for s=1,2,…,⌊ℓ2⌋s=1,2,\ldots,\left\lfloor\frac{\ell}{2}\right\rfloor, we may extend the range of ss in (1) to s=1,2,…,ℓ−1s=1,2,\ldots,\ell-1.

A Legendre pair (A,B)(A,B) is binary if A,B∈{−1,+1}ℓA,B\in\{-1,+1\}^{\ell}. A Hadamard matrix is an n×nn\times n matrix HH with elements ±1\pm1 such that HHT=nInHH^{T}=nI_n, where InI_n is the n×nn\times n identity matrix. Binary Legendre pairs of length ℓ\ell are pertinent to the construction of Hadamard matrices of order 2ℓ+22\ell+2, see for example [1 Theorem 2], [5 Theorem 3] or [8 Theorem 1]. Binary Legendre pairs of length ℓ\ell are known for several infinite sets of ℓ\ell, if ℓ>2\ell>2 is a prime (Legendre sequences), if ℓ\ell is odd and 2ℓ+12\ell+ 1 is a prime power (Szekeres), if ℓ=2r−1\ell= 2^r - 1 with r≥2r \ge2, (mm-sequences), and a set of ℓ\ell which is infinite if the twin-prime conjecture is true, if ℓ=p(p+2)\ell= p(p + 2) where pp and p+2p + 2 are twin primes, (Jacobi sequence or twin-prime sequence). Several ad hoc constructions are also known. The smallest integer for which the question of existence of binary Legendre pairs is still undecided is ℓ=115\ell= 115. See for example [10] and references therein for the results mentioned here.

A Legendre pair (A,B)(A, B) is quaternary if A,B∈{1,i,−1,−i}ℓA, B \in\{1, i, -1, -i\}^{\ell}, where i=−1i = \sqrt{-1}. The first and the third author [10] introduced quaternary Legendre pairs of length ℓ\ell and showed that they are pertinent to the construction of quaternary Hadamard matrices of order 2ℓ+22\ell+ 2 and thus of binary Hadamard matrices of order 4ℓ+44\ell+ 4. Since a binary Legendre pair can be considered quaternary we may restrict ourselves to quaternary pairs of even length ℓ\ell. Jedwab and Pender [6] showed that there is a quaternary Legendre pair of length ℓ\ell if 2ℓ+12\ell+ 1 is a prime power and if ℓ=2p\ell= 2p for an odd prime pp for which 2p−12p - 1 is a prime power. The first author, Koutschan and the third author [9, 10] found the remaining quaternary Legendre pairs of lengths ℓ≤40\ell\le40, Lebedev [11] completed the list finding 7 more values and Verma [16] settled ℓ=64\ell= 64. Now ℓ=70,76,88,92,94\ell= 70, 76, 88, 92, 94 and 100100 are the smallest undecided cases.

A Legendre pair (A,B)(A, B) is kk-ary if A,B∈{1,ξk,ξk2,…,ξkk−1}A, B \in\{1, \xi_k, \xi_k^2, \ldots, \xi_k^{k-1}\}, where ξk=e2π−1/k\xi_k = e^{2\pi\sqrt{-1}/k} is a primitive complex kk-th root of unity. For a complex matrix MM, let M∗=M‾TM^* = \overline{M}^{T} denote its conjugate transpose. A Butson Hadamard matrix H(k,n)H(k,n) is an n×nn \times n-matrix with entries in {1,ξk,ξk2,…,ξkk−1}\{1, \xi_k, \xi_k^2, \ldots, \xi_k^{k-1}\} which satisfies H(k,n)H(k,n)∗=nInH(k,n)H(k,n)^* = nI_n. From [3, 17] we know that if pp is prime, f≥1f \ge1 and n>1n > 1, then H(pf,n)H(p^f,n) can exist only for p∣np \mid n. For further non-existence results see for example [2, 17].

Our main contributions of this paper are the following results.

First, in Section 2 we prove that for prime kk a kk-ary Legendre pair of length ℓ\ell can only exist if ℓ≡−1(modk)\ell\equiv-1 \pmod{k}.

Second, in Section 3 we study the connection between Legendre pairs and Butson Hadamard matrices for general kk-ary Legendre pairs. More precisely, under explicit conditions on the sequence sums of a Legendre pair of length ℓ\ell, we construct Butson Hadamard matrices H(2k,2ℓ+2)H(2k, 2\ell+ 2) when kk is odd and H(k,2ℓ+2)H(k, 2\ell+ 2) when kk is even. For odd primes k=pk = p, these conditions are automatically satisfied, yielding a Butson Hadamard matrix H(2p,2ℓ+2)H(2p, 2\ell+ 2) from every pp-ary Legendre pair of length ℓ\ell. Note that a H(p,2ℓ+2)H(p, 2\ell+ 2) may not exist even if a pp-ary Legendre pair of length ℓ≡−1(modp)\ell\equiv-1 \pmod p exists.

Third, Section 4 deals with the case k=3k = 3, that is, ternary Legendre pairs. A pair of (generalized) mm-sequences covers all lengths of the form ℓ=3r−1\ell= 3^r - 1 with r≥1r \ge1. We combine fixed-content necklaces, integral-PAF symmetries, and exact half-frequency restrictions with compression-decompression and PSD tests. In this way we obtain ternary Legendre pairs for every admissible length ℓ≤32\ell\le32. The smallest open cases are then ℓ=35\ell= 35 and ℓ=38\ell= 38. Note that for ℓ≡−1(mod3)\ell\equiv-1 \pmod3 and ℓ≤32\ell\le32 there is no BH(3,2ℓ+2)BH(3, 2\ell+ 2) by [17 Theorem 5] up to the possible exceptions ℓ=5,17\ell= 5, 17 and 2323. However, as we proved in Section 3, for all these ℓ\ell there is a BH(6,2ℓ+2)BH(6, 2\ell+ 2).

Non-existence, balance and a construction

A non-existence result

In this subsection we derive a necessary condition on the length ℓ\ell for the existence of a kk-ary Legendre pair when kk is prime.

Theorem 1. For prime kk, a kk-ary Legendre pair of length ℓ≥2\ell\ge2 can exist only if ℓ≡−1(modk)\ell\equiv-1 \pmod k.

Proof. For k=2k = 2, the assertion is well-known. It follows from PAF(A,s)≡PAF(B,s)≡ℓ(mod4)PAF(A,s) \equiv PAF(B,s) \equiv\ell\pmod4, see for example [13 Proposition 6.4.16], and (1). Now we assume that kk is an odd prime. Let (A,B)(A,B) be a kk-ary Legendre pair of length ℓ\ell. For any s=1,…,ℓ−1s=1,\ldots,\ell-1, we have

0=PAF⁡(A,s)+PAF⁡(B,s)+2=∑j=0ℓ−1ajaj+s‾+∑j=0ℓ−1bjbj+s‾+2=∑j=0k−1cjξkj0=\operatorname{PAF}(A,s)+\operatorname{PAF}(B,s)+2=\sum_{j=0}^{\ell-1}a_j\overline{a_{j+s}}+\sum_{j=0}^{\ell-1}b_j\overline{b_{j+s}}+2=\sum_{j=0}^{k-1}c_j\xi_k^j

where cjc_j counts the occurrences of ξkj\xi_k^j in the two autocorrelation sums and two additional 1s. Thus the cjc_j are nonnegative integers satisfying

∑j=0k−1cj=2ℓ+2.\sum_{j=0}^{k-1}c_j=2\ell+2.

Since

∑j=0k−1ξkj=0,\sum_{j=0}^{k-1}\xi_k^j=0,

we get

0=∑j=0k−2(cj−ck−1)ξkj.0=\sum_{j=0}^{k-2}(c_j-c_{k-1})\xi_k^j.

As kk is prime, the cyclotomic polynomial Φk(X)=1+X+⋯+Xk−1\Phi_k(X)=1+X+\cdots+X^{k-1} has degree k−1k-1 and is irreducible over Q\mathbb{Q}. Hence 1,ξk,…,ξkk−21,\xi_k,\ldots,\xi_k^{k-2} are linearly independent over Q\mathbb{Q}. Therefore c0=⋯=ck−1c_0=\cdots=c_{k-1} and thus 2ℓ+2=kc0≡0(modk)2\ell+2=kc_0\equiv0\pmod{k}, that is,

ℓ≡−1(modk),(2)\ell\equiv-1\pmod{k}, \tag*{(2)}

and the result follows.

Balance

In this subsection we study the sequence sums of the two components of a kk-ary Legendre pair. We first establish a condition on the balance for general kk, and then determine the sequence sums and symbol compositions completely when the alphabet size is an odd prime.

Write A=[a0,a1,…,aℓ−1]A=[a_0,a_1,\ldots,a_{\ell-1}], B=[b0,b1,…,bℓ−1]B=[b_0,b_1,\ldots,b_{\ell-1}] and let (A,B)(A,B) be a kk-ary Legendre pair of length ℓ\ell. Put

α=∑j=0ℓ−1ajandβ=∑j=0ℓ−1bj.(3)\alpha=\sum_{j=0}^{\ell-1}a_j\qquad\text{and}\qquad\beta=\sum_{j=0}^{\ell-1}b_j. \tag*{(3)}

Lemma 2. For any kk-ary Legendre pair and α,β\alpha,\beta defined by (3) we have

∣α∣2+∣β∣2=2.(4)|\alpha|^2+|\beta|^2=2. \tag*{(4)}

Proof. For j=0,1,…,ℓ−1j=0,1,\ldots,\ell-1 we have

∑s=0ℓ−1aj+s‾=∑s=0ℓ−1as‾.\sum_{s=0}^{\ell-1}\overline{a_{j+s}}=\sum_{s=0}^{\ell-1}\overline{a_s}.

Hence,

∑s=0ℓ−1PAF⁡(A,s)=∑s=0ℓ−1∑j=0ℓ−1ajaj+s‾=∑j=0ℓ−1aj∑s=0ℓ−1as‾=∣∑j=0ℓ−1aj∣2=∣α∣2\sum_{s=0}^{\ell-1}\operatorname{PAF}(A,s)=\sum_{s=0}^{\ell-1}\sum_{j=0}^{\ell-1}a_j\overline{a_{j+s}}=\sum_{j=0}^{\ell-1}a_j\sum_{s=0}^{\ell-1}\overline{a_s}=\left|\sum_{j=0}^{\ell-1}a_j\right|^2=|\alpha|^2

and similarly

∑s=0ℓ−1PAF⁡(B,s)=∣β∣2.\sum_{s=0}^{\ell-1}\operatorname{PAF}(B,s)=|\beta|^2.

Therefore

∣α∣2+∣β∣2=∑s=0ℓ−1(PAF⁡(A,s)+PAF⁡(B,s))=2ℓ+(ℓ−1)⋅(−2)=2|\alpha|^2+|\beta|^2=\sum_{s=0}^{\ell-1}\bigl(\operatorname{PAF}(A,s)+\operatorname{PAF}(B,s)\bigr)=2\ell+(\ell-1)\cdot(-2)=2

by (1).

Multiplying all entries of either component by the same kkth root of unity preserves its PAFs. Independent cyclic shifts of the two components also preserve their PAFs. Simultaneously conjugating both components preserves condition (1), as does interchanging the two components. Conjugating only one component need not preserve the Legendre pair condition. Hence, for binary Legendre pairs we may assume α=β=1\alpha=\beta=1. For quaternary Legendre pairs we may assume α=0\alpha=0, β=1+i\beta=1+i for even ℓ\ell and α=β=1\alpha=\beta=1 for odd ℓ\ell, see [10].

Lemma 3. Let (A,B)(A,B) be a kk-ary Legendre pair. Then

(∣α∣2,∣β∣2)∈{(0,2),(1,1),(2,0)}.\left(\lvert\alpha\rvert^2,\lvert\beta\rvert^2\right)\in\{(0,2),(1,1),(2,0)\}.

Proof. Put x=∣α∣2x=\lvert\alpha\rvert^2. Since α∈Z[ξk]\alpha\in\mathbb{Z}[\xi_k] we have x∈Z[ξk]∩R=Z[ξk+ξk−1]x\in\mathbb{Z}[\xi_k]\cap\mathbb{R}=\mathbb{Z}[\xi_k+\xi_k^{-1}].

An automorphism σt\sigma_t of Q(ξk)\mathbb{Q}(\xi_k) is uniquely defined by σt(ξk)=ξkt\sigma_t(\xi_k)=\xi_k^t with gcd⁡(t,k)=1\gcd(t,k)=1, t=1,…,k−1t=1,\ldots,k-1. If σt\sigma_t is applied entrywise to AA and BB, then for every lag ss we have

PAF(σt(A),s)=∑j=0ℓ−1σt(aj)σt(aj+s)‾=∑j=0ℓ−1σt(aj)σt(aj+s‾)=σt(PAF(A,s))PAF(\sigma_t(A),s)=\sum_{j=0}^{\ell-1}\sigma_t(a_j)\overline{\sigma_t(a_{j+s})}=\sum_{j=0}^{\ell-1}\sigma_t(a_j)\sigma_t(\overline{a_{j+s}})=\sigma_t(PAF(A,s))

as well as PAF(σt(B),s)=σt(PAF(B,s))PAF(\sigma_t(B),s)=\sigma_t(PAF(B,s)). Hence, (σt(A),σt(B))(\sigma_t(A),\sigma_t(B)) is again a kk-ary Legendre pair.

By Lemma 2 we get ∣σt(α)∣2+∣σt(β)∣2=2\lvert\sigma_t(\alpha)\rvert^2+\lvert\sigma_t(\beta)\rvert^2=2. In particular, we have

0≤σt(x)=σt(αα‾)=∣σt(α)∣2≤2.0\leq\sigma_t(x)=\sigma_t(\alpha\overline{\alpha})=\lvert\sigma_t(\alpha)\rvert^2\leq2.

Put y=x−1y=x-1. Note that y∈Z[ξk+ξk−1]y\in\mathbb{Z}[\xi_k+\xi_k^{-1}] is an algebraic integer and thus its norm, the product of its conjugates σt(y)=σt(x)−1\sigma_t(y)=\sigma_t(x)-1, gcd⁡(t,k)=1\gcd(t,k)=1, t=0,…,⌊k/2⌋t=0,\ldots,\lfloor k/2\rfloor, is a rational integer in [−1,1][-1,1], that is, y∈{−1,0,1}y\in\{-1,0,1\} and thus x=∣α∣2∈{0,1,2}x=\lvert\alpha\rvert^2\in\{0,1,2\}. Finally, Lemma 2 gives ∣α∣2+∣β∣2=2\lvert\alpha\rvert^2+\lvert\beta\rvert^2=2, and the result follows.

Let crc_r be the number of n=0,1,…,ℓ−1n=0,1,\ldots,\ell-1 with an=ξkra_n=\xi_k^r. Then we call (c0,c1,…,ck−1)(c_0,c_1,\ldots,c_{k-1}) the symbol composition of A=[a0,a1,…,aℓ−1]A=[a_0,a_1,\ldots,a_{\ell-1}].

Theorem 4. Let pp be an odd prime and let (A,B)(A,B) be a pp-ary Legendre pair of length ℓ≥2\ell\geq2. Then

α,β∈{−1,−ξp,…,−ξpp−1}.\alpha,\beta\in\{-1,-\xi_p,\ldots,-\xi_p^{p-1}\}.

Consequently, after multiplying AA and BB independently by suitable ppth roots of unity, we may assume

α=β=−1.\alpha=\beta=-1.

Moreover, writing ℓ=ph−1\ell=ph-1, after this normalization each component has symbol composition

(c0,c1,…,cp−1)=(h−1,h,…,h).(c_0,c_1,\ldots,c_{p-1})=(h-1,h,\ldots,h).

Proof. We first exclude the possibility that one of the sequence sums vanishes. Obviously, we have

∑r=0p−1cr=ℓandα=∑r=0p−1crξpcr.\sum_{r=0}^{p-1}c_r=\ell\quad\text{and}\quad\alpha=\sum_{r=0}^{p-1}c_r\xi_p^{cr}.

Suppose that α=0\alpha=0 and define P(X)=∑r=0p−1crXr∈Z[X]P(X)=\sum_{r=0}^{p-1}c_rX^r\in\mathbb{Z}[X]. Then P(ξp)=0P(\xi_p)=0. Since pp is prime, Φp(X)=1+X+⋯+Xp−1\Phi_p(X)=1+X+\cdots+X^{p-1} is the minimal polynomial of ξp\xi_p over Q\mathbb{Q}, of degree $p-1. Hence Φp\Phi_p divides PP in Q[X]\mathbb{Q}[X]. Because deg⁡P≤p−1\deg P\leq p-1, we must have P(X)=cΦp(X)P(X)=c\Phi_p(X) for some c∈Qc\in\mathbb{Q}. Comparing coefficients gives c0=c1=⋯=cp−1=cc_0=c_1=\cdots=c_{p-1}=c. Since the crc_r are integers, c∈Zc\in\mathbb{Z}, and therefore p∣ℓp\mid\ell, contradicting Theorem 1, which gives ℓ≡−1(modp)\ell\equiv-1\pmod p. Thus α≠0\alpha\neq0. The same argument shows that β≠0\beta\neq0.

Lemma 3 now implies ∣α∣2=∣β∣2=1\lvert\alpha\rvert^2=\lvert\beta\rvert^2=1.

We next determine the multiplicities crc_r. For 0≤t≤p−10\leq t\leq p-1, set

St=∑r=0p−1crξptr.S_t=\sum_{r=0}^{p-1}c_r\xi_p^{tr}.

For t=0t=0 we have S0=ℓS_0=\ell. For 1≤t≤p−11\leq t\leq p-1, the map

σt:ξp↦ξpt\sigma_t:\xi_p\mapsto\xi_p^t

defines an automorphism of Q(ξp)\mathbb{Q}(\xi_p), and St=σt(α)S_t=\sigma_t(\alpha). We have

∣St∣2=σt(α)σt(α)‾=σt(αα‾)=σt(1)=1.|S_t|^2=\sigma_t(\alpha)\overline{\sigma_t(\alpha)}=\sigma_t(\alpha\overline{\alpha})=\sigma_t(1)=1.

Thus

∑t=0p−1∣St∣2=ℓ2+p−1.\sum_{t=0}^{p-1}|S_t|^2=\ell^2+p-1.

Using the orthogonality relation

∑t=0p−1ξpt(r−s)={p,r=s,0,r≠s,\sum_{t=0}^{p-1}\xi_p^{t(r-s)}= \begin{cases} p, & r=s,\\ 0, & r\ne s, \end{cases}

we obtain

∑t=0p−1∣St∣2=∑t=0p−1∑r=0p−1∑s=0p−1crcsξpt(r−s)=p∑r=0p−1cr2.\sum_{t=0}^{p-1}|S_t|^2=\sum_{t=0}^{p-1}\sum_{r=0}^{p-1}\sum_{s=0}^{p-1}c_rc_s\xi_p^{t(r-s)}=p\sum_{r=0}^{p-1}c_r^2.

Consequently, p∑r=0p−1cr2=ℓ2+p−1p\sum_{r=0}^{p-1}c_r^2=\ell^2+p-1. By Theorem 1, we can write ℓ=ph−1\ell=ph-1 for some positive integer hh. Then

∑r=0p−1cr=ph−1and∑r=0p−1cr2=ph2−2h+1=(h−1)2+(p−1)h2.\sum_{r=0}^{p-1}c_r=ph-1 \qquad\text{and}\qquad \sum_{r=0}^{p-1}c_r^2=ph^2-2h+1=(h-1)^2+(p-1)h^2.

Obviously, c0=h−1c_0=h-1 and cr=hc_r=h for r=1,2,…,p−1r=1,2,\ldots,p-1 is a solution of this system of equations. Among all pp-tuples of nonnegative integers with fixed sum ph−1ph-1, the sum of squares is minimized when the entries differ by at most one. Indeed, if cr≥cs+2c_r\ge c_s+2, replacing (cr,cs)(c_r,c_s) by (cr−1,cs+1)(c_r-1,c_s+1) preserves the total sum and changes the sum of squares by

(cr−1)2+(cs+1)2−cr2−cs2=−2(cr−cs)+2<0.(c_r-1)^2+(c_s+1)^2-c_r^2-c_s^2=-2(c_r-c_s)+2<0.

Thus a solution tuple must have entries differing by at most one, that is, a cyclic shift of (h−1,h,h,…,h)(h-1,h,h,\ldots,h). Therefore

α=(h−1)ξpa+h∑0≤r≤p−1r≠aξpr=h∑r=0p−1ξpr−ξpa=−ξpa.\alpha=(h-1)\xi_p^a+h\sum_{\substack{0\le r\le p-1\\r\ne a}}\xi_p^r =h\sum_{r=0}^{p-1}\xi_p^r-\xi_p^a=-\xi_p^a.

The same argument applied to BB gives β=−ξpb\beta=-\xi_p^b for some bb. Finally, multiply every entry of AA by ξp−a\xi_p^{-a} and every entry of BB by ξp−b\xi_p^{-b} and we may assume α=β=−1\alpha=\beta=-1.

mm-sequences: k=pk=p is prime and ℓ=pr−1\ell=p^r-1

We recall the following standard construction for the convenience of the reader.

Let k=pk=p be prime, let r≥1r\ge1 with pr>2p^r>2, and put ℓ=pr−1\ell=p^r-1. Let gg be a primitive element of Fpr\mathbb{F}_{p^r}, and let

ψ(x)=exp⁡(2π−1pTr⁡Fpr/Fp(x))\psi(x)=\exp\left(\frac{2\pi\sqrt{-1}}{p}\operatorname{Tr}_{\mathbb{F}_{p^r}/\mathbb{F}_p}(x)\right)

be the canonical additive character of Fpr\mathbb{F}_{p^r}. Define

A=B=[a0,a1,…,aℓ−1],aj=bj=ψ(gj−1),0≤j≤ℓ−1.A=B=[a_0,a_1,\ldots,a_{\ell-1}],\qquad a_j=b_j=\psi(g^j-1),\quad0\le j\le\ell-1.

In particular, we have a0=b0=ψ(0)=1a_0=b_0=\psi(0)=1. For 1≤s≤ℓ−1=pr−21\le s\le\ell-1=p^r-2, we have

PAF(A,s)=PAF(B,s)=∑j=0ℓ−1ψ(gj−1)ψ(gj+s−1)‾=∑j=0ℓ−1ψ((1−gs)gj)=∑γ∈Fpr∗ψ((1−gs)γ)=∑η∈Fpr∗ψ(η)=−1.\begin{aligned} PAF(A,s)=PAF(B,s)=\sum_{j=0}^{\ell-1}\psi(g^j-1)\overline{\psi(g^{j+s}-1)}=\sum_{j=0}^{\ell-1}\psi\left((1-g^s)g^j\right) \\ &=\sum_{\gamma\in\mathbb{F}_{p^r}^{*}}\psi\left((1-g^s)\gamma\right)=\sum_{\eta\in\mathbb{F}_{p^r}^{*}}\psi(\eta)=-1. \end{aligned}

Indeed, gs≠1g^s\ne1 for 1≤s≤pr−21\le s\le p^r-2, so the map

γ⟼(1−gs)γ\gamma\longmapsto(1-g^s)\gamma

is a bijection of Fpr∗\mathbb{F}_{p^r}^{*}. The last equality follows from the orthogonality of nontrivial additive characters; see, for example, [12 Chapter 5.1]. Hence

PAF(A,s)+PAF(B,s)=−2,1≤s≤ℓ−1,PAF(A,s)+PAF(B,s)=-2,\qquad1\le s\le\ell-1,

and therefore (A,B)(A,B) is a pp-ary Legendre pair of length ℓ=pr−1\ell=p^r-1. Note that the definition of Legendre pairs includes the case A=BA=B, that is, PAF(A,s)=−1PAF(A,s)=-1 for 1≤s≤ℓ−11\le s\le\ell-1.

k-ary Legendre pairs and Butson Hadamard matrices

The circulant matrix C(A)C(A) defined by A=[a0,a1,…,aℓ−1]A=[a_0,a_1,\ldots,a_{\ell-1}] is

C(A)=[a0a1⋯aℓ−2aℓ−1aℓ−1a0⋯aℓ−3aℓ−2⋮⋮⋱⋮⋮a2a3⋯a0a1a1a2⋯aℓ−1a0].C(A)=\begin{bmatrix} a_0&a_1&\cdots&a_{\ell-2}&a_{\ell-1}\\ a_{\ell-1}&a_0&\cdots&a_{\ell-3}&a_{\ell-2}\\ \vdots&\vdots&\ddots&\vdots&\vdots\\ a_2&a_3&\cdots&a_0&a_1\\ a_1&a_2&\cdots&a_{\ell-1}&a_0 \end{bmatrix}.

Clearly, we have

C(A)C(B)=C(B)C(A),(5)C(A)C(B)=C(B)C(A), \tag*{(5)}

see for example [4 Theorem 3.2.4], and

[C(A)C(B)][C(A)‾TC(B)‾T]=[PAF(A,u−v)+PAF(B,u−v)]1≤u,v≤ℓ=[2ℓ−2⋯−2−22ℓ⋯−2⋮⋮⋱⋮−2−2⋯2ℓ]ℓ×ℓ.(6)\begin{aligned} \begin{bmatrix} C(A)&C(B)\end{bmatrix} \begin{bmatrix}\overline{C(A)}^{\mathsf{T}}\\\overline{C(B)}^{\mathsf{T}}\end{bmatrix} = \left[PAF(A,u-v)+PAF(B,u-v)\right]_{1\le u,v\le\ell} \\ &= \begin{bmatrix} 2\ell&-2&\cdots&-2\\ -2&2\ell&\cdots&-2\\ \vdots&\vdots&\ddots&\vdots\\ -2&-2&\cdots&2\ell \end{bmatrix}_{\ell\times\ell}. \tag*{(6)} \end{aligned}

To border the circulant block matrix, we seek two additional coordinates making the first two rows orthogonal to the lower block rows. The resulting linear equations lead naturally to the following choices of z,wz,w (and x,yx,y in the even case):

z=12(α−β−α‾−β‾),w=12ξ2k(β−α−α‾−β‾).(7)z=\frac{1}{2}\left(\alpha-\beta-\overline{\alpha}-\overline{\beta}\right),\qquad w=\frac{1}{2}\xi_{2k}\left(\beta-\alpha-\overline{\alpha}-\overline{\beta}\right). \tag*{(7)}
x=12(α−β−α‾−β‾),y=12(β−α−α‾−β‾).(8)x=\frac{1}{2}\left(\alpha-\beta-\overline{\alpha}-\overline{\beta}\right),\qquad y=\frac{1}{2}\left(\beta-\alpha-\overline{\alpha}-\overline{\beta}\right). \tag*{(8)}

It is easy to see that

∣z∣2+∣w∣2=∣α∣2+∣β∣2,z−wξ‾2k=α−β,z+wξ‾2k=−α‾−β‾,(9)|z|^2+|w|^2=|\alpha|^2+|\beta|^2,\qquad z-w\overline{\xi}_{2k}=\alpha-\beta,\qquad z+w\overline{\xi}_{2k}=-\overline{\alpha}-\overline{\beta}, \tag*{(9)}
∣x∣2+∣y∣2=∣α∣2+∣β∣2,x−y=α−β,x+y=−α‾−β‾.(10)|x|^2+|y|^2=|\alpha|^2+|\beta|^2,\qquad x-y=\alpha-\beta,\qquad x+y=-\overline{\alpha}-\overline{\beta}. \tag*{(10)}

The following theorem extends the known Hadamard matrix constructions from binary and quaternary Legendre pairs to the kk-ary setting.

Theorem 5. Let k≥2k \ge2 be an integer and let (A,B)(A,B) be a kk-ary Legendre pair of length ℓ\ell.

I. Suppose that kk is odd and z,w∈{1,ξ2k,ξ2k2,…,ξ2kk−1}z,w \in\{1,\xi_{2k},\xi_{2k}^{2},\ldots,\xi_{2k}^{k-1}\}, where z,wz,w are defined by (7). Then

H(2k,2ℓ+2)=[zw1⋯11⋯1w‾−z‾ξ2k⋯ξ2k−ξ2k⋯−ξ2k1ξ‾2k⋮⋮C(A)C(B)1ξ‾2k1−ξ‾2k⋮⋮C(B‾)T−C(A‾)T1−ξ‾2k]H(2k,2\ell+2)=\begin{bmatrix} z & w & 1 & \cdots& 1 & 1 & \cdots& 1\\ \overline{w} & -\overline{z} & \xi_{2k} & \cdots& \xi_{2k} & -\xi_{2k} & \cdots& -\xi_{2k}\\ 1 & \overline{\xi}_{2k} & & & & & &\\ \vdots& \vdots& & C(A) & & & C(B) &\\ 1 & \overline{\xi}_{2k} & & & & & &\\ \hline 1 & -\overline{\xi}_{2k} & & & & & &\\ \vdots& \vdots& & C(\overline{B})^{T} & & & -C(\overline{A})^{T} &\\ 1 & -\overline{\xi}_{2k} & & & & & & \end{bmatrix}

is a Butson Hadamard matrix of order 2ℓ+22\ell+2.

II. Suppose that kk is even and x,y∈{1,ξk,ξk2,…,ξkk−1}x,y \in\{1,\xi_k,\xi_k^2,\ldots,\xi_k^{k-1}\}, where x,yx,y are defined by (8). Then

H(k,2ℓ+2)=[xy1⋯11⋯1y‾−x‾1⋯1−1⋯−111⋮⋮C(A)C(B)111−1⋮⋮C(B‾)T−C(A‾)T1−1]H(k,2\ell+2)=\begin{bmatrix} x & y & 1 & \cdots& 1 & 1 & \cdots& 1\\ \overline{y} & -\overline{x} & 1 & \cdots& 1 & -1 & \cdots& -1\\ 1 & 1 & & & & & &\\ \vdots& \vdots& & C(A) & & & C(B) &\\ 1 & 1 & & & & & &\\ \hline 1 & -1 & & & & & &\\ \vdots& \vdots& & C(\overline{B})^{T} & & & -C(\overline{A})^{T} &\\ 1 & -1 & & & & & & \end{bmatrix}

is a Butson Hadamard matrix of order 2ℓ+22\ell+2.

Proof. We prove Part I. Put ζ=ξ2k\zeta=\xi_{2k}, P=C(A)P=C(A), Q=C(B)Q=C(B), and let 1\mathbf{1} denote the all-one row vector of length ℓ\ell. By assumption, all entries of the displayed matrix are 2k2k-th roots of unity.

By (4) and (9), each of the first two rows has squared norm

∣z∣2+∣w∣2+2ℓ=2ℓ+2,|z|^2+|w|^2+2\ell=2\ell+2,

and their inner product is

zw−wz+ℓζ‾−ℓζ‾=0.zw-wz+\ell\overline{\zeta}-\ell\overline{\zeta}=0.

Since every row of PP and QQ has sum α\alpha and β\beta, respectively, the inner products of the first row with rows in the two lower block rows are

z+wζ+α‾+β‾=0,z−wζ+β−α=0z+w\zeta+\overline{\alpha}+\overline{\beta}=0,\qquad z-w\zeta+\beta-\alpha=0

by (9). For the second row the corresponding inner products are

w‾−(ζ‾z+ζ(α‾−β‾))=0,w‾+ζ‾z+ζ(α+β)=0,\overline{w}-(\overline{\zeta}z+\zeta(\overline{\alpha}-\overline{\beta}))=0,\qquad\overline{w}+\overline{\zeta}z+\zeta(\alpha+\beta)=0,

which follow by taking complex conjugates in (9).

For two different rows in the first lower block row, the first two entries contribute 22, while (6) gives contribution 2ℓ2\ell on the diagonal and −2-2 off the diagonal from the remaining entries. Thus these rows have squared norm 2ℓ+22\ell+2 and are mutually orthogonal. The same holds for the second lower block row, since circulant matrices are normal and hence

P∗P=PP∗,Q∗Q=QQ∗.P^{*}P=PP^{*},\qquad Q^{*}Q=QQ^{*}.

Finally, for rows belonging to different lower block rows, the contribution from the first two entries is zero, whereas that from the remaining blocks is

PQ−QP=0PQ-QP=0

::: by (5). Hence all rows are mutually orthogonal and have squared norm 2ℓ+22\ell+ 2, so the displayed matrix is an H(2k,2ℓ+2)H(2k, 2\ell+ 2).

Part II follows in exactly the same way, replacing ζ\zeta, zz, ww by 11, xx, yy, respectively, and using (10) in place of (9).

Corollary 6. Let pp be an odd prime and let (A,B)(A, B) be a pp-ary Legendre pair of length ℓ≥2\ell\ge2. Then there exists a Butson Hadamard matrix H(2p,2ℓ+2)H(2p, 2\ell+ 2).

Proof. By Theorem 4, after multiplying AA and BB independently by suitable ppth roots of unity, we may assume α=β=−1\alpha= \beta= -1. Then the quantities defined in (7) become

z=12(α−β−α‾−β‾)=1z = \frac{1}{2}(\alpha-\beta-\overline{\alpha}-\overline{\beta})=1

and

w=12ζ2p(β−α−α‾−β‾)=ζ2p−1.w = \frac{1}{2\zeta_{2p}}(\beta-\alpha-\overline{\alpha}-\overline{\beta})=\zeta_{2p}^{-1}.

Thus both zz and ww are 2p2pth roots of unity, and Theorem 5 (I) applies.

For k=2k = 2 we may assume α=β=1\alpha= \beta= 1, so that x=y=−1x = y = -1. For k=4k = 4 and even ℓ\ell we may assume α=0\alpha= 0 and β=1+i\beta= 1 + i, so that x=−1x = -1 and y=iy = i. For every odd prime pp, Part I applies automatically by Corollary 6.

For odd prime pp, the construction therefore always yields an H(2p,2ℓ+2)H(2p, 2\ell+ 2). As mentioned in the introduction, in many cases there exists a ternary Legendre pair of length ℓ≡−1(mod3)\ell\equiv-1 \pmod{3} but no H(p,2ℓ+2)H(p, 2\ell+ 2).

For general composite kk, it is not clear whether the conditions on zz, ww or xx, yy in Theorem 5 are automatically satisfied.

Ternary Legendre pairs

We now specialize to k=3k = 3. By Theorem 1, every ternary Legendre pair has length

ℓ≡−1(mod3).\ell\equiv-1 \pmod{3}.

By Theorem 4, after multiplying the two components independently by suitable third roots of unity, we may assume

α=∑j=0ℓ−1aj=−1,β=∑j=0ℓ−1bj=−1.\alpha= \sum_{j=0}^{\ell-1} a_j = -1,\qquad\beta= \sum_{j=0}^{\ell-1} b_j = -1.

Writing ℓ=3h−1\ell= 3h - 1, Theorem 4 shows that each normalized component has composition (h−1,h,h)(h - 1, h, h) with respect to the symbols 1,ξ3,ξ321,\xi_3,\xi_3^2. The construction of Section 2.3 gives ternary Legendre pairs of lengths ℓ=3r−1\ell= 3^r - 1, r≥1r \ge1, that is, 2,8,26,80,…2, 8, 26, 80, \ldots.

For compactness, in the explicit examples below we sometimes write a ternary sequence as an exponent sequence [r0,…,rℓ−1][r_0,\ldots,r_{\ell-1}], where rj∈{0,1,2}r_j \in\{0,1,2\} represents the entry ξ3rj\xi_3^{r_j}.

Searches using necklaces with fixed content

Our searches produced ternary Legendre pairs of lengths ℓ=5,11,17\ell= 5, 11, 17 and 2323. We record existence results, without claiming a complete enumeration of pairs or their equivalence classes. Explicit witnesses for lengths 5, 11, and 17 are given in Appendix A. We give details for ℓ=23\ell= 23. After normalization, each component has composition (7,8,8)(7, 8, 8). After a cyclic shift, we may fix the first entry to be 1. Then there are

(226)(168)=74613⋅12870≈9.6×108\binom{22}{6}\binom{16}{8}=74613\cdot12870\approx9.6\times10^8

possible sequences before equivalences are taken into account. An example of a ternary Legendre pair of length 23 is

A=[0,1,1,2,2,1,0,0,1,2,0,2,1,1,2,0,2,1,2,1,0,0,2],A = [0,1,1,2,2,1,0,0,1,2,0,2,1,1,2,0,2,1,2,1,0,0,2],

B=[0,1,1,1,2,1,2,2,1,1,2,1,1,0,0,0,2,2,0,2,0,2,0].B = [0,1,1,1,2,1,2,2,1,1,2,1,1,0,0,0,2,2,0,2,0,2,0].

A direct exact computation gives

PAF⁡(A,s)+PAF⁡(B,s)=−2,1≤s≤22.\operatorname{PAF}(A,s)+\operatorname{PAF}(B,s)=-2,\qquad1\le s\le22.

The search can be reduced substantially by generating only necklaces with fixed content. A necklace is the lexicographically smallest member of a rotation class; see [14]. Algorithms for necklaces with fixed content are described in [7]. For ℓ=23\ell=23 and content (7,8,8)(7,8,8) there are only 137,181,330 such necklaces. Thus the balance result of Section 2 is not only structural: it fixes the content used by the necklace generator before any correlation computation is performed.

Integral PAF parameters and reflection symmetry

For searches restricted to integral periodic autocorrelations, one can impose additional exact arithmetic constraints.

Proposition 7. Let (A,B)(A,B) be a normalized ternary Legendre pair of length ℓ=3h−1\ell=3h-1. Suppose that the nonzero PAFs of one, equivalently both, components are integers. Then there are integers xux_u, 1≤u≤ℓ−11\le u\le\ell-1, such that

PAF⁡(A,u)=−1+3xu,PAF⁡(B,u)=−1−3xu.\operatorname{PAF}(A,u)=-1+3x_u,\qquad\operatorname{PAF}(B,u)=-1-3x_u.

Moreover,

∣xu∣≤⌊h−12⌋,xℓ−u=xu,∑u=1ℓ−1xu=0.\lvert x_u\rvert\le\left\lfloor\frac{h-1}{2}\right\rfloor,\qquad x_{\ell-u}=x_u,\qquad\sum_{u=1}^{\ell-1}x_u=0.

More precisely, if

NrA(u)=#{j:ajaj+u‾=ξ3r},NrB(u)=#{j:bjbj+u‾=ξ3r},0≤r≤2,N_r^A(u)=\#\{j:a_j\overline{a_{j+u}}=\xi_3^r\},\qquad N_r^B(u)=\#\{j:b_j\overline{b_{j+u}}=\xi_3^r\},\qquad0\le r\le2,

then

N0A(u)=h−1+2xu,N1A(u)=N2A(u)=h−xu,N_0^A(u)=h-1+2x_u,\qquad N_1^A(u)=N_2^A(u)=h-x_u,
N0B(u)=h−1−2xu,N1B(u)=N2B(u)=h+xu.N_0^B(u)=h-1-2x_u,\qquad N_1^B(u)=N_2^B(u)=h+x_u.

Proof. Fix a nonzero lag uu and suppose PAF⁡(A,u)=m∈Z\operatorname{PAF}(A,u)=m\in\mathbb{Z}. Since

PAF⁡(A,u)=N0A(u)+N1A(u)ξ3+N2A(u)ξ32,\operatorname{PAF}(A,u)=N_0^A(u)+N_1^A(u)\xi_3+N_2^A(u)\xi_3^2,

the relation 1+ξ3+ξ32=01+\xi_3+\xi_3^2=0 implies N1A(u)=N2A(u)N_1^A(u)=N_2^A(u). Hence m≡ℓ≡−1(mod3)m\equiv\ell\equiv-1\pmod{3}, and therefore m=−1+3xum=-1+3x_u for a unique xu∈Zx_u\in\mathbb{Z}. The Legendre pair identity gives PAF⁡(B,u)=−1−3xu\operatorname{PAF}(B,u)=-1-3x_u. Solving the equations for the three difference counts gives the displayed formulas, and their nonnegativity yields the pointwise bound.

For every complex sequence, we have PAF⁡(A,ℓ−u)=PAF⁡(A,u)‾\operatorname{PAF}(A,\ell-u)=\overline{\operatorname{PAF}(A,u)}. Since the PAF values here are integers, they are real, and hence xℓ−u=xux_{\ell-u}=x_u. Finally,

∑u=0ℓ−1PAF⁡(A,u)=∣α∣2=1.\sum_{u=0}^{\ell-1}\operatorname{PAF}(A,u)=\lvert\alpha\rvert^2=1.

Using PAF⁡(A,0)=ℓ\operatorname{PAF}(A,0)=\ell and PAF⁡(A,u)=−1+3xu\operatorname{PAF}(A,u)=-1+3x_u for u≠0u\ne0 gives

∑u=1ℓ−1xu=0.\sum_{u=1}^{\ell-1}x_u=0.

If ℓ\ell is odd, the reflection symmetry immediately gives ∑u=1(ℓ−1)/2xu=0\sum_{u=1}^{(\ell-1)/2}x_u=0. Thus an integral-PAF search at odd length needs only half of the PAF coordinates, together with a zero-sum condition.

As an illustration, a ternary Legendre pair of length 29 is

A=[0,0,1,0,1,2,1,2,0,2,2,1,1,2,0,2,1,1,2,2,0,2,1,2,1,0,1,0,0],A=[0,0,1,0,1,2,1,2,0,2,2,1,1,2,0,\\ 2,1,1,2,2,0,2,1,2,1,0,1,0,0],
B=[1,2,1,1,2,0,0,0,2,1,1,0,2,2,0,2,2,0,1,1,2,0,0,0,2,1,1,2,1].B=[1,2,1,1,2,0,0,0,2,1,1,0,2,2,0,\\ 2,2,0,1,1,2,0,0,0,2,1,1,2,1].

For this pair, exact computation gives

(x1,…,x28)=(−1,2,−1,0,2,0,−1,0,0,0,0,−1,0,0,0,0,−1,0,0,0,0,−1,0,2,0,−1,2,−1).(x_1,\ldots,x_{28})=(-1,2,-1,0,2,0,-1,0,0,0,0,-1,0,0,\\ 0,0,-1,0,0,0,0,-1,0,2,0,-1,2,-1).

In particular, x29−u=xux_{29-u}=x_u and ∑u=114xu=0\sum_{u=1}^{14}x_u=0. This provides a convenient exact certificate for the integral PAF profile and illustrates the reduction available in this subclass.

Half-frequency restrictions and compressed searches

We next consider even lengths. The discrete Fourier transform and the power spectral density of a sequence C=[c0,…,cℓ−1]C=[c_0,\ldots,c_{\ell-1}] are

DFT(C,s)=∑j=0ℓ−1cjζℓjs,PSD(C,s)=∣DFT(C,s)∣2.DFT(C,s)=\sum_{j=0}^{\ell-1}c_j\zeta_\ell^{js},\qquad PSD(C,s)=\lvert DFT(C,s)\rvert^2.

For a Legendre pair, we have PSD(A,s)+PSD(B,s)=2ℓ+2PSD(A,s)+PSD(B,s)=2\ell+2, 1≤s≤ℓ−11\leq s\leq\ell-1. Consequently, the usual PSD test discards any candidate component CC for which PSD(C,s)>2ℓ+2PSD(C,s)>2\ell+2 at some nonzero frequency.

For a divisor tt of ℓ\ell, the compression of C=[c0,…,cℓ−1]C=[c_0,\ldots,c_{\ell-1}] by the factor ℓ/t\ell/t is the length-tt sequence Ct=[c0′,…,ct−1′]C_t=[c'_0,\ldots,c'_{t-1}], where

cj′=∑s=0ℓ/t−1cst+j.c'_j=\sum_{s=0}^{\ell/t-1}c_{st+j}.

When t=2t=2, write

C2=[γ0,γ1],γ0=∑jc2j,γ1=∑jc2j+1.C_2=[\gamma_0,\gamma_1],\qquad\gamma_0=\sum_jc_{2j},\quad\gamma_1=\sum_jc_{2j+1}.

Then

PSD(C2,1)=PSD(C,ℓ2)=∣γ0−γ1∣2.PSD(C_2,1)=PSD\left(C,\frac{\ell}{2}\right)=\lvert\gamma_0-\gamma_1\rvert^2.

Thus compression to length 2 is exactly the half-frequency test.

The fixed composition from § 2 yields a sharper form of this test. Since an admissible even ternary length has the form ℓ=6m+2\ell=6m+2, each normalized component has composition (2m,2m+1,2m+1)(2m,2m+1,2m+1). For a component CC, let ere_r and oro_r be the numbers of occurrences of ξ3r\xi_3^r in the even and odd positions, respectively, and put

dr=er−or,r=0,1,2.d_r=e_r-o_r,\qquad r=0,1,2.

Theorem 8. Let (A,B)(A,B) be a normalized ternary Legendre pair of even length ℓ=6m+2\ell=6m+2. For each component C∈{A,B}C\in\{A,B\}, we have

PSD(C,ℓ2)=3QC,QC=d02+d0d1+d12.PSD\left(C,\frac{\ell}{2}\right)=3Q_C,\qquad Q_C=d_0^2+d_0d_1+d_1^2.

The integer QCQ_C is positive and odd, and QA+QB=4m+2Q_A+Q_B=4m+2.

Proof. There are equally many even and odd positions, so d0+d1+d2=0d_0+d_1+d_2=0. The fixed composition gives

d0=0(mod2),d1≡d2≡1(mod2).d_0=0 \pmod{2},\qquad d_1\equiv d_2\equiv1 \pmod{2}.

Moreover,

DFT(C,ℓ2)=d0+d1ξ3+d2ξ32.DFT\left(C,\frac{\ell}{2}\right)=d_0+d_1\xi_3+d_2\xi_3^2.

Using d2=−d0−d1d_2=-d_0-d_1 and 1+ξ3+ξ32=01+\xi_3+\xi_3^2=0, a direct calculation gives

∣d0+d1ξ3+d2ξ32∣2=3(d02+d0d1+d12).\left|d_0+d_1\xi_3+d_2\xi_3^2\right|^2=3\left(d_0^2+d_0d_1+d_1^2\right).

Since d1d_1 is odd, QC>0Q_C>0, and the parity conditions show that QCQ_C is odd. Finally,

PSD(A,ℓ2)+PSD(B,ℓ2)=2ℓ+2=12m+6,PSD\left(A,\frac{\ell}{2}\right)+PSD\left(B,\frac{\ell}{2}\right)=2\ell+2=12m+6,

which yields QA+QB=4m+2Q_A+Q_B=4m+2.

Corollary 9. Under the assumptions of Theorem 8, we have

PSD(A,ℓ2)≡PSD(B,ℓ2)≡3(mod6).PSD\left(A,\frac{\ell}{2}\right)\equiv PSD\left(B,\frac{\ell}{2}\right)\equiv3 \pmod{6}.

Moreover, in the prime factorization of each half-frequency PSD, every prime congruent to 2 modulo 3 occurs with even exponent.

Proof. The congruence follows because QAQ_A and QBQ_B are odd. Also

QC=d02+d0d1+d12=NQ(ξ3)/Q(d0−d1ξ3).Q_C=d_0^2+d_0d_1+d_1^2=N_{\mathbb{Q}(\xi_3)/\mathbb{Q}}(d_0-d_1\xi_3).

Every prime congruent to 2 modulo 3 occurs with even exponent in an Eisenstein norm; see, for example, [2 Theorem 3.1] or [15]. Multiplication by 3 does not affect this assertion.

The theorem fits directly into the existing compression-decompression search. Indeed, once an admissible pair (QA,QB)(Q_A,Q_B) has been chosen, a vector (d0,d1,d2)(d_0,d_1,d_2) determines the parity content of a component uniquely:

e0=m+d0/2,o0=m−d0/2,e1=(2m+1+d1)/2,o1=(2m+1−d1)/2,e2=(2m+1+d2)/2,o2=(2m+1−d2)/2.\begin{aligned} e_0&=m+d_0/2, & o_0&=m-d_0/2,\\ e_1&=(2m+1+d_1)/2, & o_1&=(2m+1-d_1)/2,\\ e_2&=(2m+1+d_2)/2, & o_2&=(2m+1-d_2)/2. \end{aligned}

Equivalently, in terms of the even-position counts,

PSD(C,ℓ2)=9(2m+1−(e1+e2))2+3(e1−e2)2.PSD\left(C,\frac{\ell}{2}\right)=9(2m+1-(e_1+e_2))^2+3(e_1-e_2)^2.

Thus the exact half-frequency restriction is applied first, the corresponding parity contents are generated next, and only then are decompression and the full PSD test performed. The original search method is therefore retained, but its candidate space is reduced before the expensive stages.

This approach yields ternary Legendre pairs of lengths 14 and 20. An explicit length-14 witness is included in Appendix § 5. For ℓ=20\ell=20 we have m=3m=3 and hence QA+QB=14Q_A+Q_B=14. The admissible complementary Eisenstein norms give, up to interchanging the components,

(PSD(A,10),PSD(B,10))∈{(21,21),(3,39)}.(PSD(A,10),PSD(B,10))\in\{(21,21),(3,39)\}.

For example, in the case (21,21)(21,21) one may take parity contents

(e0,e1,e2;o0,o1,o2)=(4,4,2;2,3,5)(e_0,e_1,e_2;o_0,o_1,o_2)=(4,4,2;2,3,5)

for each component. This leaves

(104)(64)(102)(83)=7.938×106\binom{10}{4}\binom{6}{4}\binom{10}{2}\binom{8}{3}=7.938\times10^{6}

candidate sequences for each component before the remaining filters. A search within this candidate class yields the following ternary Legendre pair:

A=[0,1,0,0,2,2,0,1,1,2,1,2,1,2,1,1,0,2,2,0],A=[0,1,0,0,2,2,0,1,1,2,1,2,1,2,1,1,0,2,2,0],
B=[0,1,0,2,1,1,1,2,0,1,0,0,2,2,1,2,1,2,2,0].B=[0,1,0,2,1,1,1,2,0,1,0,0,2,2,1,2,1,2,2,0].

An exact computation verifies PAF(A,s)+PAF(B,s)=−2PAF(A,s)+PAF(B,s)=-2 for every nonzero lag.

The length-32 search

The exact half-frequency restriction is particularly effective at length 32. Here m=5m=5, so QA+QB=22Q_A+Q_B=22. Since

QC=(d1+d02)2+34d02Q_C=\left(d_1+\frac{d_0}{2}\right)^2+\frac{3}{4}d_0^2

and d0d_0 is even, the bound QC≤21Q_C\le21 gives d0∈{0,±2,±4}d_0\in\{0,\pm2,\pm4\}. A short enumeration yields

QC∈{1,3,7,9,13,19,21}.Q_C\in\{1,3,7,9,13,19,21\}.

Consequently, up to interchanging AA and BB, the only possible half-frequency pairs are

(PSD(A,16),PSD(B,16))∈{(3,63),(9,57),(27,39)}.(PSD(A,16),PSD(B,16))\in\{(3,63),(9,57),(27,39)\}.

Thus every ternary Legendre pair of length 32 must belong to one of these three spectral cases, which can therefore be searched separately. These are necessary conditions; no realization of every spectral case is asserted.

A targeted search in the case (9,57)(9,57) yields the following ternary Legendre pair:

A=[0,1,0,0,0,0,1,0,2,2,1,1,2,1,2,1,0,1,1,0,2,2,1,2,0,1,0,2,1,2,2,2],A=[0,1,0,0,0,0,1,0,2,2,1,1,2,1,2,1,0,1,1,0,2,2,1,2,0,1,0,2,1,2,2,2],
B=[0,0,1,2,1,0,0,0,2,2,2,2,0,0,1,2,0,1,1,2,1,2,1,1,0,2,1,1,2,2,0,1].B=[0,0,1,2,1,0,0,0,2,2,2,2,0,0,1,2,0,1,1,2,1,2,1,1,0,2,1,1,2,2,0,1].

The even/odd symbol counts are

A:(6,5,5;4,6,6),B:(6,7,3;4,4,8),A:(6,5,5;4,6,6),\qquad B:(6,7,3;4,4,8),

so the half-frequency PSDs are indeed 9 and 57, respectively. For s≠0s\ne0, define

Nr(s)=#{j:aja‾j+s=ξ3r}+#{j:bjb‾j+s=ξ3r}.N_r(s)=\#\{j:a_j\overline{a}_{j+s}=\xi_3^r\}+\#\{j:b_j\overline{b}_{j+s}=\xi_3^r\}.

Exact computation gives

(N0(s),N1(s),N2(s))=(20,22,22),1≤s≤31.(N_0(s),N_1(s),N_2(s))=(20,22,22),\qquad1\le s\le31.

Hence

PAF(A,s)+PAF(B,s)=20+22ξ3+22ξ32=−2PAF(A,s)+PAF(B,s)=20+22\xi_3+22\xi_3^2=-2

for every nonzero lag, proving that the displayed sequences form a ternary Legendre pair of length 32.

The same half-frequency calculation can be used prospectively at larger even lengths. For example, at ℓ=38\ell= 38 it gives, up to interchanging the components,

(PSD(A,19),PSD(B,19))∈{(3,75),(21,57),(39,39)},(PSD(A,19),PSD(B,19)) \in\{(3,75),(21,57),(39,39)\},

which provides three exact cases for a targeted search. Here the admissible values with QC≤25Q_C \le25 are

1,3,7,9,13,19,21,25,1,3,7,9,13,19,21,25,

and the complementary pairs summing to 26 are (1,25)(1,25), (7,19)(7,19) and (13,13)(13,13).

Conjecture 10. Ternary Legendre pairs exist for every admissible length ℓ≡−1(mod3)\ell\equiv-1 \pmod{3}.

The preceding examples illustrate the role of the arithmetic restrictions in the search. The balance theorem fixes the symbol composition, the half-frequency result restricts the admissible spectral cases at even lengths, and the integral-PAF symmetry provides an additional reduction when the autocorrelations are integral. Together with fixed-content necklaces, compression and the PSD test, these conditions provide a layered search strategy for larger ternary lengths. The next open cases are 35 and 38. A broader arithmetic and cyclotomic framework for the structure of Legendre pairs, motivated in part by the computational phenomena observed here, will be developed elsewhere.

Explicit small-length certificates

For completeness, we give directly checkable witnesses for the small lengths stated in Section 4 but not displayed there. In the table below, an exponent word r0⋯rℓ−1r_0\cdots r_{\ell-1} denotes the sequence [ξ3r0,…,ξ3rℓ−1][\xi_3^{r_0},\ldots,\xi_3^{r_{\ell-1}}]. Each row gives one existence certificate; no total number of solutions or equivalence classes is asserted. The length-11 and length-14 witnesses were independently reconstructed when preparing these certificates and are not a reproduction of the original search logs.

ℓ\ellExponent word for AAExponent word for BB
51202112021
110012021121200021122121
140012020212112100112211022201
170121220101022121012110220002201121

Table 1.

For each listed length, write ℓ=3h−1\ell= 3h - 1. Both components have composition (h−1,h,h)(h-1,h,h). For every nonzero lag uu, define the combined quotient counts

Mr(u)=#{j:ajaj+u‾=ξ3r}+#{j:bjbj+u‾=ξ3r},0≤r≤2.M_r(u)=\#\{j:a_j\overline{a_{j+u}}=\xi_3^r\}+\#\{j:b_j\overline{b_{j+u}}=\xi_3^r\},\qquad0\le r\le2.

Direct integer evaluation at every 1≤u≤ℓ−11\le u\le\ell-1 gives

ℓ\ell(M0(u),M1(u),M2(u))(M_0(u),M_1(u),M_2(u)) for every nonzero uu
5(2,4,4)(2,4,4)
11(6,8,8)(6,8,8)
14(8,10,10)(8,10,10)
17(10,12,12)(10,12,12)

Table 2.

In each case this is (2h−2,2h,2h)(2h-2,2h,2h), so

PAF(A,u)+PAF(B,u)=(2h−2)+2hξ3+2hξ32=−2.PAF(A,u)+PAF(B,u)=(2h-2)+2h\xi_3+2h\xi_3^2=-2.

This verifies the Legendre pair condition without floating-point arithmetic. The accompanying file verify_existence.py performs these checks, checks all explicit pairs in the main text, and generates normalized mm-sequence certificates for lengths 2, 8, and 26 using the construction of Section 2.3. Thus every nontrivial admissible length 2≤ℓ≤322 \le\ell\le32 is covered either by that construction or by an explicit checked pair. The verification establishes existence, not the completeness or original output count of any search.

Acknowledgments

The authors thank the organizers and referees of SETA 2026 for helpful comments and discussions. This work was developed in part during a visit of Huaning Liu to RICAM, Linz, and during a visit to the Hangzhou International Innovation Institute of Beihang University (H3I), Sino-French Laboratory for Mathematics (SFLM), Hangzhou, P. R. China. The second author was supported by National Natural Science Foundation of China under Grant No. 12571008, and the Science and Technology Program of Shaanxi Province of China under Grant No. 2024JC-JCQN-04. The third author was funded in part by the Austrian Science Fund (FWF) (Grant No. 10.55776/PAT4719224).

References

  1. [1]K. T. Arasu, D. A. Bulutoğlu and J. R. Hollon, Legendre G-array pairs and the theoretical unification of several G-array families, J. Combin. Des., 28 (2020), no. 11, pp. 814–841.arxiv.org/abs/2004.05608
  2. [2]B. W. Brock, Hermitian congruence and the existence and completion of generalized Hadamard matrices, J. Combin. Theory Ser. A, 49 (1988), no. 2, pp. 233–261.DOI
  3. [3]A. T. Butson, Generalized Hadamard matrices, Proc. Amer. Math. Soc., 13 (1962), pp. 894–898.DOI
  4. [4]P. J. Davis, Circulant matrices. Wiley-Intersci. Publ. Pure Appl. Math. John Wiley & Sons, New York-Chichester-Brisbane, 1979.
  5. [5]R. J. Fletcher, M. Gysin and J. Seberry, Application of the discrete Fourier transform to the search for generalised Legendre pairs and Hadamard matrices, Australas. J. Combin., 23 (2001), pp. 75–86.
  6. [6]J. Jedwab, T. Pender, Two constructions of quaternary Legendre pairs of even length, Comb. Theory, 5 (2025), no. 2, Paper No. 15, 18 pp.arxiv.org/abs/2408.08472
  7. [7]S. Karim, J. Sawada, Z. Alamgir, S. M. Husnine, Generating brackets with fixed content, Theoret. Comput. Sci. 475, 2013, pp. 103–112.DOI
  8. [8]I. S. Kotsireas, Structured Hadamard conjecture. Number theory and related fields. In memory of Alf van der Poorten. Edited by Jonathan M. Borwein, Igor Shparlinski and Wadim Zudilin. pp. 215–227, Springer Proc. Math. Stat., 43, Springer, New York, 2013.DOI
  9. [9]I. S. Kotsireas, C. Koutschan, A. Winterhof, Quaternary Legendre pairs II, Discrete Math., 348 (2025), no. 9, Paper No. 114501.DOI
  10. [10]I. S. Kotsireas, A. Winterhof, Quaternary Legendre pairs, in New Advances in Designs, Codes and Cryptography (C. J. Colbourn and J. H. Dinitz, eds.), Fields Institute Communications, vol. 86, Springer, Cham, 2024, pp. 289–304.arxiv.org/abs/2212.10953
  11. [11]N. Lebedev, Quaternary Legendre pairs of lengths 42, 46, 52, 58, 66, 72, and 80, https://arxiv.org/abs/2609.04589
  12. [12]R. Lidl, H. Niederreiter, Finite fields. Cambridge University Press, Cambridge, 1997.
  13. [13]H. Niederreiter, A. Winterhof, Applied number theory. Springer, Cham, 2015.DOI
  14. [14]J. Sawada, Generating bracelets in constant amortized time, SIAM J. Comput. 31, No 1, 2001 pp. 259–268.DOI
  15. [15]R. J. Turyn, Character sums and difference sets. Pacific J. Math. 15 (1965), pp. 319–346.DOI
  16. [16]H. Verma, A quaternary Legendre pair of length 64, https://arxiv.org/abs/2609.25573.
  17. [17]A. Winterhof, On the non-existence of generalized Hadamard matrices, J. Statist. Plann. Inference, 84 (2000), no. 1-2, pp. 337–342.DOI

Paper details

vlnc:W_6976knj3
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents