More efficient Prime