Find prime fast, java