Abstract
Pseudorandom binary sequences balanced and with optimal autocorrelation have many applications in the stream cipher, communication, coding theory, etc. Constructing a binary sequences with three-level autocorrelation is equivalent to finding the corresponding characteristic set of the sequences that should be an almost difference set. In the work of T.W. Cusick, C. Ding, and A. Renvall in 1998, the authors gave the necessary and sufficient conditions by which a set of octic residues modulo an odd prime forms an almost difference set. In this paper we show that no integers verify those conditions by the theory of generalized Pell equations. In addition, by relaxing the definition of almost difference set given by the same authors, we could construct two classes of modified almost difference sets and two ones of difference sets from the set of octic residues.