logic to check prime number. There are any references about logic to check prime number in here. you can look below.