Clean up next/prev_prime; handle multiples of 7/11/13/17/19/23 natively