Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether a number is a safe prime
23 is a safe prime, because both 23=2·11+1 and 11 are primes:
In[1]:= |
Out[1]= |
29 is not a safe prime, because 29=2·14+1 but 14 is not prime:
In[2]:= |
Out[2]= |
Even though 15=2·7+1 and 7 is a prime number, 15 is not a safe prime because it is not prime itself:
In[3]:= |
Out[3]= |
This work is licensed under a Creative Commons Attribution 4.0 International License