'Routine for finding powers of a permutation.
Examples
>>> from sympy.combinatorics.permutations import Permutation
>>> Permutation.print_cyclic = False
>>> p = Permutation([2,0,3,1])
>>> p.order()
4
>>> p**4
Permutation([0, 1, 2, 3])'

def __pow__(self, n):

    if isinstance(n, Permutation):
        raise NotImplementedError('p**p    is    not    defined;    do    you    mean    p^p    (conjugate)?')
    n = int(n)
    return self._af_new(_af_pow(self.array_form, n))
