The Richter Scale is based on the "amplitude" of the ground motion as measured by a seismometer. It is not based on the energy released (aka "intensity"). The first reference, from an impeccable source (the US Geological Survey), explains the difference. The Richter scale is a base 10 logarithmic scale, meaning each unit increase in magnitude (eg 5.3 vs 4.3) is an event with 10 times greater "amplitude". But the larger event releases about 31 times as much energy, not 10 times. If you want to calculate the Richter number, based on S and P wave arrival times and amplitude shown on a seismogram, check out the second reference.