Updated to include 2 as prime.