Quadratic residue and tw in prime sequences are well known types of binary
sequence with ideal periodic autocorrelation functions. These are just spec
ial cases of much larger families of sequences referred to here as Legendre
sequences and modified Jacobi sequences. Although these more general forms
are suboptimal and do not have ideal autocorrelation functions, neverthele
ss they do exhibit out-of-phase autocorrelation values which are independen
t of their lengths, and so the longer sequences may be useful. The structur
e and properties of these sequences are investigated, and a two-dimensional
array representation that enables the sequences and their autocorrelation
functions to be derived in a simple and compact manner are employed.