New prime? method with the use of upto and pred