?
Are prime numbers and quadratic residues random?
Appeals to randomness in various number-theoretic constructions appear regularly in modern scientific publications. Such famous names as V.I. Arnold, M. Katz, Ya.G. Sinai, and T. Tao are just a few examples. Unfortunately, all of these approaches rely on various, although often very non-trivial and elegant, heuristics. A new analytical approach is proposed to address the issue of randomness/complexity of an individual deterministic sequence. This approach demonstrates the expected high complexity of quadratic residues and the unexpectedly low complexity in the case of prime numbers. Technically, our approach is based on a new construction of the dynamical entropy of a single trajectory, which measures its complexity, in contrast to classical Kolmogorov-Sinai and topological entropies, which measure the complexity of the entire dynamical system.