Modular Arithmetic Question using Sage
Hey forumgoers, just have a question using Sage. I am having trouble with a few questions asked to me, heres the questions, how do can you compute (n-1)! mod n for n < 100. Find a formula relating the number of idempotents in Zsubn with the number of distinct prime factors that n has.
An element a in Z(subn) is a square if there is some b element of Z(subn) such that a^2=b. Find the number of squares in Z(sub p^n).