prime factorization (faster) | ScratchStats