Gauss’s Criterion

May 1, 2018

Yesterday was the 241st anniversary of the birth of Carl Gauss, who is perhaps the greatest mathematician who ever lived. In his honor, I picked a small task based on some mathematics that he discovered. Gauss’s Criterion states:

Let p be an odd prime and b a positive integer not divisible by p. Then for each positive integer 2 k − 1 < p, let rk be rk ≡ ( 2 k − 1) b (mod p) with 0 < rk < p, and let t be the number of even rk s. Then (b/p) = (-1)t, where (b/p) is the Legendre symbol.

Your task is to write a program to compute Gauss’s criterion, and confirm that it is the appropriate power of the Legendre symbol. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.

Advertisements

Pages: 1 2