fix prime number partition