Just now I was doing some tinkering in sage.rings.integer_mod_ring with the aim of fixing ticket #5250, where Sage wrongly claims that (Z / 162Z)^* is non-cyclic when it is. That turned out to be easy to fix, but in the process I discovered something more nasty: the method "multiplicative_subgroups" for the IntegerModRing class returns answers that are wrong.
For example, take N = 341 = 11 * 31. Then (Z / NZ)^* is isomorphic to C_10 x C_30. The current method just calculates all subgroups of C_10 and all subgroups of C_30, and returns the products of those. This is clearly wrong, since not all subgroups of a direct product are products of subgroups of the factors. In fact in this example there are 80 subgroups -- I checked in GAP -- and Sage only finds 32 of them. Does anyone know a good, fast algorithm for solving this problem (correctly)? Alternatively, can someone give me a hint on how to use Gap for this? It has the right command (SubgroupsSolvableGroup) but I'm struggling to work out how to convert Gap's output back into Sage. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---