Function to test if big nmber is a perfect power
Addition of mp_isperfpower