On the arithmetic autocorrelation of the Legendre sequence

The Legendre sequence possesses several desirable features of pseudorandomness in view of different applications such as a high linear complexity (profile) for cryptography and a small (aperiodic) autocorrelation for radar, gps, or sonar. Here we prove the first nontrivial bound on its arithmetic autocorrelation, another figure of merit introduced by Mandelbaum for error-correcting codes.


Introduction
For a prime p > 2 let ( n ) be the Legendre sequence defined by where .
. is the Legendre symbol.Obviously, ( n ) is p-periodic.The Legendre sequence satisfies several desirable features of pseudorandomness.For example, Turyn [13] proved that it has a high linear complexity, see also [3] and [1,Chapter 9.3].It also provides a high linear complexity profile, see [12,Theorem 9.2].It is well known (see [10], [11]) that the (periodic) autocorrelation of the Legendre sequence is two-valued or three-valued, depending on whether p ≡ 3 (mod 4) or p ≡ 1 (mod 4), and that the absolute value of the aperiodic autocorrelation is of order of magnitude at most p 1/2 log p for 1 ≤ t ≤ p−1 and 1 ≤ M ≤ p−1.
Moreover, Mauduit and Sárközy [9] studied correlations of higher order.Ding [2] studied the pattern distribution of the Legendre sequence.More precisely, for i 0 , i 1 , . . ., i s−1 ∈ {0, 1} and 0 In [2, Proposition 2] Ding proved that In this article we study a different notion of autocorrelation, the arithmetic autocorrelation introduced by Mandelbaum [8].Also, see the recent monograph by Goresky and Klapper [7] for more background and results on arithmetic correlations.Sequences with small arithmetic autocorrelation can be used to define codes over the integers (instead of finite fields) that can correct many errors.For an eventually T -periodic binary sequence (s n ) with preperiod T 0 , that is where The arithmetic autocorrelation function A(t) of a (purely) T -periodic binary sequence (a n ) is defined as follows.For t ∈ {1, 2, . . ., T − 1} let (a n+t ) be the shift of (a n ) by lag t.Put Note that with respect to the 2-norm of Q, that is the geometric series ∞ n=0 x n converges for any even integer x to ∞ n=0 In particular we have ∞ n=0 2 n = −1, or more general and therefore we get We write and thus (s n,t ) is eventually periodic with period T from T on (see also Goresky and Klapper [4, Proposition 2]) since In both cases we define For the Legendre sequence ( n ) we will prove that which is the main result of this article.For very small min{t, p−t} we improve this bound.We start with a preliminary result on the symmetry of the arithmetic autocorrelation and add its proof for the convenience of the reader.

Symmetry of the arithmetic autocorrelation
Proposition 1.The arithmetic autocorrelation function of a periodic binary sequence (a n ) of least period T satisfies Proof.For 0 ≤ t < T , let x t and α t be defined by (3).If x 0 > x t , then we have with (s n,k ) defined by (4).Both (s n,t ) and (s n,T −t ) are (eventually) periodic with period T from T on and the number of ones in a period of (s n,t ) equals the number of zeros in a period of (s n,T −t ).Hence, If x 0 < x t , then we have by ( 5) and the result follows as in the first case.

A bound on the arithmetic autocorrelation of the Legendre sequence
For t = 1 the arithmetic autocorrelation of the Legendre sequence ( n ) is easy to determine.Then

/2 and thus
Now we deal with any 1 ≤ t ≤ p − 1.
Proof.By ( 6) and Proposition 1 we may assume 2 ≤ t ≤ (p − 1)/2.In the following we derive a lower bound on the number N 1 of ones in a period of the p-periodic sequence (s n,t ) defined by (4).
).The subtraction of 0 from 1 gives no carry, no matter if there was a carry in the previous step.Hence Since there are 2 k+1 possible choices for the pattern ( 9) we count at least ).The subtraction of 1 from 0 gives a carry, no matter if there was a carry in the previous step.Hence Just as before there are 2 k+1 possible choices for the pattern ( 9) and so we get at least p/2 k+3 − (k + 2)2 k+1 p 1/2 additional n with s n,t = 1.
Thus in total we have at least p/2 k+2 −(k+2 Summing up all the contributions we get the formula The first sum on the right hand side of the inequality is a geometric series, hence we have 1 4 The second sum can be estimated by where we used m ≤ 1/4 log 2 p.Thus by the definition of m we get Analogously N 0 can be bounded below by and therefore since Now we assume 2 ≤ t ≤ m, that means some indices in (9) coincide and so we have to deal with shorter patterns.From (8) we know that (for fixed a) the number of patterns (9) satisfying the assumptions ( 7) in ( 10) is at least Similarly as before if a = 1, then and if a = 0, then For each case we have 2 k+1 possible choices for the pattern (9) if k ≤ t − 2 and 2 t−1 possible choices if k ≥ t − 1 and thus in total we count at least , 1)} for j = 0, . . ., k − 1 and s n,t = 1.Put m = 2m − t + 1. Summing up all the contributions we get where we used m ≤ 1/4 log 2 p.Thus by the definition of m Analogously N 0 can be bounded below by and therefore Thus the result follows.

Final remarks
For fixed 1 ≤ t < T , Goresky and Klapper [5,6] proved that the expected arithmetic autocorrelation, averaged over all binary sequences of period T , is T 2 T −gcd(t,T ) .Sequences with ideal arithmetic autocorrelation equal to zero for all nontrivial shifts t are known, see [4].However, the maximum absolute value of the (classical) autocorrelation of these so-called -sequences equals the period since the second half of a period is the bit-wise complement of the first half [4, Proposition 1].Hence, these sequences are far away from looking random.In contrast to these sequences, the Legendre sequence of (almost) perfect (classical) autocorrelation still guarantees a rather small arithmetic autocorrelation with respect to its period p if p is sufficiently large.
The following table of maximum absolute values of the arithmetic autocorrelation of the Legendre sequence of period p for all primes p < 150 may lead to the conjecture that it is bounded by p 1/2 ln p which we actually checked for all primes p < 1000:

Conclusion
We showed that the Legendre sequence of period p has a maximal (absolute value of the) arithmetic autocorrelation of order of magnitude at most p 3/4 log 2 p.Besides many previously known nice properties including a very small (classical) autocorrelation, this is another desirable feature of pseudorandomness (for sufficiently large p).