Using Enum.with_index and :math.pow. Still have to reverse the list though.