This group of exercises is about the group of units mod \(n\), \(U(n)\), which is sometimes cyclic, sometimes not. There are some commands in Sage that will answer some of these questions very quickly, but instead of using those now, just use the basic techniques described. The idea here is to just work with elements, and lists of elements, to discern the subgroup structure of these groups.

##### 1

Execute the statement `R = Integers(40)` to create the set `[0,1,2,...,39]` This is a group under addition mod \(40\), which we will ignore. Instead we are interested in the subset of elements which have an inverse under *multiplication* mod \(40\). Determine how big this subgroup is by executing the command `R.unit_group_order()`, and then obtain a list of these elements with `R.list_of_elements_of_multiplicative_group()`.

##### 2

You can create elements of this group by coercing regular integers into `U`, such as with the statement `a = U(7)`. (Don't confuse this with our mathematical notation \(U(40)\).) This will tell Sage that you want to view \(7\) as an element of \(U\), subject to the corresponding operations. Determine the elements of the cyclic subgroup of \(U\) generated by \(7\) with a list comprehension as follows:

What is the order of \(7\) in \(U(40)\)?

##### 3

The group \(U(49)\) is cyclic. Using only the Sage commands described previously, use Sage to find a generator for this group. Now using *only* theorems about the structure of cyclic groups, describe each of the subgroups of \(U(49)\) by specifying its order and by giving an explicit generator. Do not repeat any of the subgroups — in other words, present each subgroup *exactly* once. You can use Sage to check your work on the subgroups, but your answer about the subgroups should rely only on theorems and be a nicely written paragraph with a table, etc.

##### 4

The group \(U(35)\) is not cyclic. Again, using only the Sage commands described previously, use computations to provide irrefutable evidence of this. How many of the \(16\) different subgroups of \(U(35)\) can you list?

##### 5

Again, using only the Sage commands described previously, explore the structure of \(U(n)\) for various values of \(n\) and see if you can formulate an interesting conjecture about some basic property of this group. (Yes, this is a *very* open-ended question, but this is ultimately the real power of exploring mathematics with Sage.)