NumberTheory
NextSafePrime
least safe prime greater than a number
Calling Sequence
Parameters
Description
Examples
Compatibility
NextSafePrime(n)
n
-
positive integer
The NextSafePrime(n) command computes the smallest safe prime greater than n.
A prime number p is said to be a safe prime if p is of the form 2⁢q+1 where q is also prime.
with⁡NumberTheory:
NextSafePrime⁡1
5
NextSafePrime⁡5
7
NextSafePrime⁡327653
327707
isprime⁡327707−12
true
The NumberTheory[NextSafePrime] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
Download Help Document
What kind of issue would you like to report? (Optional)