1 | initial version |

Hello,

This is more a mathematical question rather than a Sage question. Given a permutation $\pi$ with a given cycle decomposition, let say $p = [p_0, p_1, ..., p_{m-1}]$ (I mean that the cycles of $\pi$ have lengths $p_0$, $p_1$, etc). Then the cycle decomposition of the action of $\pi$ on sets can be explicitely computed in terms of $p$. In particular, for the question of the number of cycles you get $$\sum_{i=0}^{m-1} \sum_{j=0}^{i-1} \gcd(p_i, p_j) + \sum_{i=0}^{m-1} \left\lfloor \frac{p_i}{2} \right\rfloor$$.

The above sum can be easily computed with Sage.

Vincent

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.