Define ="the product of the totatives of m"= as per your statement.

It is known that has an inverse modulo iff , therefore, every in the above product is either it's own inverse, , or can be "matched" with its inverse

The "matched" factors disappear from the product, so which is always inclusive of and (do you see why?)

Also, since is always even, and we've removed an even number of factors, there are always an even number of 's which are their own inverse modulo , for any .

So, what is the product of these self-inverses? Well, if a and b are both self-inverses then , so . This proves that for all .

Now, which is which? Overwhelmingly, , the exceptions being I am having difficulty picking out a pattern in this sequence, and I don't believe any kind of formula can express it. However, we've shown that our product is the product ofpairsof self-inverses, . For , there must be an even number of pairs

This is getting somewhat beyond me, here. Are there any known rules dictating the square roots of 1 modulo m?