Thanks to Kit Baum, as always, getprime is now available on SSC. The package includes two commands you can use:
- getprime: this command allows you to get the prime number closer to the number you pass. You can get the prime number below the number you pass or above it, depending on what you want/need.
- isprime: this command determines whether the number you pass as an argument is a prime number or not. This command is used by getprime but can also be used by itself.