Primecoin mining calc refinement, as per mikaelh