1) How much more energy is released in a 5.0 magnitude earthquake than a 4.0 magnitude earthquake.

I know that each unit of Richter magnitude equates to roughly a 32-fold energy increase and that the amplitude has a tenfold increase but I am still confused on how to get the energy. Would it be 32 times more? Please help!!