Exercise 1. This software lists all idempotents (see the chapter exercises for the definition) in \(Z_n\). Run the program for various values of \(n\). Use these data to make conjectures about the number of idempotents in \(Z_n\) as a function of \(n\). For example, how many idempotents are there when \(n\) is a prime power? What about when \(n\) is divisible by exactly two distinct primes? In the case where \(n\) is of the form \(pq\) where \(p\) and \(q\) are primes can you see a relationship between the two idempotents that are not 0 and 1? Can you see a relationship between the number of idempotents for a given \(n\) and the number of distinct prime divisors of \(n\)?

Please enter \(n\) and click the button, the idempotents in \(Z_n\) will show below.