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