Since the current Sage implementation of derangements is a wrapper for a GAP function, and doesn't always work as you'd like, I've bunged the first draft of a more complete native implementation of derangements up as ticket #9005.
cheers, Alasdair -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org