(self, rank, n)
return Prufer([L[i] for i in xrange(len(L))])
Finds the unranked Prufer sequence.

        Examples
        ========

        >>> from sympy.combinatorics.prufer import Prufer
        >>> Prufer.unrank(0, 4)
        Prufer([0, 0])
Finds the unranked Prufer sequence.
Finds the unranked Prufer sequence .
def unrank(self, rank, n):
        """Finds the unranked Prufer sequence.

        Examples
        ========

        >>> from sympy.combinatorics.prufer import Prufer
        >>> Prufer.unrank(0, 4)
        Prufer([0, 0])

        """
        n, rank = as_int(n), as_int(rank)
        L = defaultdict(int)
        for i in xrange(n - 3, -1, -1):
            L[i] = rank % n
            rank = (rank - L[i])//n
        return Prufer([L[i] for i in xrange(len(L))])
def unrank ( self , rank , n ) : n , rank = as_int ( n ) , as_int ( rank ) L = defaultdict ( int ) for i in xrange ( n - 3 , - 1 , - 1 ) : L [ i ] = rank % n rank = ( rank - L [ i ] ) // n return Prufer ( [ L [ i ] for i in xrange ( len ( L ) ) ] )