Logic For Prime Numbers