Or try this;
Pull out and reseat the RAM first.
Get memtest to test the RAM. Cluck here
Unzip memtest.zip and copy the memtest binary to the top level of your HD. To run it boot to Single User mode, Command-S at startup, then type /memtest*all*4*-L. * = space. /memtest invokes the app, all tells it to test all available RAM, 4 tells it 4 passes, -L puts a log on the top level of the HD.
It takes quite a while to run all depending on how much RAM you have, and since it's in SU mode the fans will all run full blast. It should end up with no errors. If it say errors were found when it's done that's not good. If it locks the machine up it's not a good thing either.
If it tests OK with the above voodoo, when booted normally, double click the memtest binary, it will launch Terminal and run memtest. In SU mode the RAM caches in the processor are disabled, but are enabled booted normally. If it tests good in SU mode, but fails booted normally, a processor is more than likely bad.