Wednesday, January 28, 2009

Squares and walks


The (quasi-) random walk represented in the picture corresponds to the cubic polynomial
f(X) = X^3-X-1 mod 2003.
Every step is a unit step. The n-th step is made to the right if f(n) is a perfect square modulo 2003, and to the left, if f(n) is a non-square.