Adding the constraint of only needing to classify a particular form of prime will always result in an algorithm of equal or lesser complexity order.