Power loop and recursion