Exercise 5. In the ring \(Z_n\) this software finds the number of solutions to the equation \(x^2 = -1\). Run the program for all primes between \(3\) and \(29\). How does the answer depend on the prime? Make a conjecture about the number of solutions when \(n\) is a prime greater than \(2\). Run the program for the squares of all primes between \(3\) and \(29\). Make a conjecture about the number of solutions when \(n\) is the square of a prime greater than \(2\). Run the program for the cubes of primes between \(3\) and \(29\). Make a conjecture about the number of solutions when \(n\) is any power of an odd prime. Run the program for \(n = 2, 4, 8, 16\), and \(32\). Make a conjecture about the number of solutions when \(n\) is a power of \(2\). Run the program for \(n = 12, 20, 24, 28\), and \(36\). Make a conjecture about the number of solutions when \(n\) is a multiple of \(4\). Run the program for various cases where \(n = pq\) and \(n = 2pq\) where \(p\) and \(q\) are odd primes. Make a conjecture about the number of solutions when \(n = pq\) or \(n = 2pq\) where \(p\) and \(q\) are odd primes. What relationship do you see between the number of solutions for \(n = p\) and \(n = q\) and \(n = pq\)? Run the program for various cases where \(n = pqr\) and \(n = 2pqr\) where \(p, q\) and \(r\) are odd primes. Make a conjecture about the number of solutions when \(n = pqr\) or \(n = 2pqr\) where \(p\), \(q\) and \(r\) are odd primes. What relationship do you see between the number of solutions when \(n = p\), \(n = q\) and \(n = r\) and the case that \(n = pqr\)?

Please enter \(n\) and click the button, the solutions will show below.