WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

modulus m
971
animate
randomize m
restrictions on m:
composite
prime
prime mod 24:
1 mod 24
5 mod 24
7 mod 24
11 mod 24
13 mod 24
17 mod 24
19 mod 24
23 mod 24
This Demonstration shows two types of pseudorandom walks constructed from Gauss sums, an exponential (red) and a quadratic residue (blue) Gauss walk. The random walk starts at the origin, takes steps given by the terms of the exponential or quadratic residue Gauss sum modulo
m
, and ends at the value of the Gauss sum. By a famous result of Gauss, if the modulus
m
is a prime number, the two walks always end at the same point, located at
(0,
m
)
or
(
m
,0)
depending on the remainder of
m
modulo 4. The exponential Gauss walk has a characteristic shape consisting of two spirals. The quadratic residue Gauss walk exhibits a more complex behavior whose shape is roughly determined by the remainder of
m
modulo 24.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.