Instructions:
Select a number from the menu, call it n. The set of all
numbers that are prime relative to n appears in a row that is
labeled Z*n. Click on a button in the Z*n row.
Call the number displayed on that button m.
The number m will be multiplied by all numbers in the set
Z*n, modulo n. The results appear directly below
each element of Z*n in the row labeled res:.
For example, if n is 19 and 9 is clicked, 9*9 mod 19 is 5
which is directly below the 9; if 5 is clicked, 5*14 mod 19 is 13
which appears below the 14 in the Z*n row.
Observe:
 All of the numbers in the Z*n row are unique and they
all appear uniquely in the res: row.
 Every number in Z*n must have an inverse since 1 must
always appear in both rows as implied by the above. For example,
if n is 19, the inverse of 9 is found by clicking on the 9
and locating the 1 in the res: row. The number directly
above the 1 is 17. Hence, 17 is the inverse of 9 mod 19.
 The number in the button below the clicked button is the square
of the number in the clicked button. Hence the square root of a
number, if it exists, may be obtained by clicking buttons until the
desired number appears in the res: row beneath the clicked button.
The number above that one is its square root.
 If n is prime, half the numbers of Z*n have
square roots, the others have two square roots.
 The two square roots of a number that has square roots are at the
same offset from either end of the top row. Hence, for n =
19, the square root of 1 is 1 and 18, the square root of 4 is 2 and
17, the square root of 9 is 3 and 16 and so on.
 n1 mod n is also 1 mod n. Hence,
if n is prime, each square root is 1 times the other.

