paper

Searching for Patterns among Squares Modulo p

arXiv:1612.05852

Abstract

Although squaring integers is deterministic, squares modulo a prime, , appear to be random. First, because they are all generated by the multiplicative linear congruential equation, , where and is any primitive root of , a pseudorandom number heuristic suggests that they are, in fact, unpredictable. Moreover, one type of cryptography makes use of discrete algorithms, which depends on the difficulty of solving for given and . This suggests that the squares, which are exactly the even powers of , are hard to identify. On the other hand, the Legendre symbol, , which equals if a is a square modulo and otherwise, has proven patterns. For example, holds true, and this shows that squares modulo have some structure. This paper considers the randomness of the following sequence: . Because it consists of binary data, the runs test is applied, which suggests that the number of runs is exactly (p-1)/2. This turns out to be a theorem proved by Aladov in 1896 that is not widely known. Consequently, this is an example of a number theory fact that is revealed naturally in a statistical setting, but one that has rarely been noted by mathematicians.

Joint Statistical Meetings 2016 Proceedings

Searching for Patterns among Squares Modulo p · wovepaper