Binary sequences derived from differences of consecutive quadratic residues
Authors: Winterhof Arne , Xiao Zibi 
Published: August 2020

<p style='text-indent:20px;'>For a prime <inline-formula><tex-math id="M1">\begin{document}$ p\ge 5 $\end{document}</tex-math></inline-formula> let <inline-formula><tex-math id="M2">\begin{document}$ q_0,q_1,\ldots,q_{(p-3)/2} $\end{document}</tex-math></inline-formula> be the quadratic residues modulo <inline-formula><tex-math id="M3">\begin{document}$ p $\end{document}</tex-math></inline-formula> in increasing order. We study two <inline-formula><tex-math id="M4">\begin{document}$ (p-3)/2 $\end{document}</tex-math></inline-formula>-periodic binary sequences <inline-formula><tex-math id="M5">\begin{document}$ (d_n) $\end{document}</tex-math></inline-formula> and <inline-formula><tex-math id="M6">\begin{document}$ (t_n) $\end{document}</tex-math></inline-formula> defined by <inline-formula><tex-math id="M7">\begin{document}$ d_n = q_n+q_{n+1}\bmod 2 $\end{document}</tex-math></inline-formula> and <inline-formula><tex-math id="M8">\begin{document}$ t_n = 1 $\end{document}</tex-math></inline-formula> if <inline-formula><tex-math id="M9">\begin{document}$ q_{n+1} = q_n+1 $\end{document}</tex-math></inline-formula> and <inline-formula><tex-math id="M10">\begin{document}$ t_n = 0 $\end{document}</tex-math></inline-formula> otherwise, <inline-formula><tex-math id="M11">\begin{document}$ n = 0,1,\ldots,(p-5)/2 $\end{document}</tex-math></inline-formula>. For both sequences we find some sufficient conditions for attaining the maximal linear complexity <inline-formula><tex-math id="M12">\begin{document}$ (p-3)/2 $\end{document}</tex-math></inline-formula>.</p><p style='text-indent:20px;'>Studying the linear complexity of <inline-formula><tex-math id="M13">\begin{document}$ (d_n) $\end{document}</tex-math></inline-formula> was motivated by heuristics of Caragiu et al. However, <inline-formula><tex-math id="M14">\begin{document}$ (d_n) $\end{document}</tex-math></inline-formula> is not balanced and we show that a period of <inline-formula><tex-math id="M15">\begin{document}$ (d_n) $\end{document}</tex-math></inline-formula> contains about <inline-formula><tex-math id="M16">\begin{document}$ 1/3 $\end{document}</tex-math></inline-formula> zeros and <inline-formula><tex-math id="M17">\begin{document}$ 2/3 $\end{document}</tex-math></inline-formula> ones if <inline-formula><tex-math id="M18">\begin{document}$ p $\end{document}</tex-math></inline-formula> is sufficiently large. In contrast, <inline-formula><tex-math id="M19">\begin{document}$ (t_n) $\end{document}</tex-math></inline-formula> is not only essentially balanced but also all longer patterns of length <inline-formula><tex-math id="M20">\begin{document}$ s $\end{document}</tex-math></inline-formula> appear essentially equally often in the vector sequence <inline-formula><tex-math id="M21">\begin{document}$ (t_n,t_{n+1},\ldots,t_{n+s-1}) $\end{document}</tex-math></inline-formula>, <inline-formula><tex-math id="M22">\begin{document}$ n = 0,1,\ldots,(p-5)/2 $\end{document}</tex-math></inline-formula>, for any fixed <inline-formula><tex-math id="M23">\begin{document}$ s $\end{document}</tex-math></inline-formula> and sufficiently large <inline-formula><tex-math id="M24">\begin{document}$ p $\end{document}</tex-math></inline-formula>.</p>