A prime number is also called a prime number. A natural number greater than 1 is called a prime number if it is not divisible by any other natural number except 1 and itself; otherwise it is called a composite number (provided that 1 is neither a prime nor a composite number).
Check if it's a prime number. Determine if the number is a prime number.
Next prime number, find the largest prime number smaller than this number
Next prime, find the smallest prime greater than this number