Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether a number is a strong prime
The prime number 457 is strong:
In[1]:= | ![]() |
Out[1]= | ![]() |
To show this, we must show that 457 is bigger than the average of its preceding and succeeding primes. First, find the number of primes less than or equal to 457:
In[2]:= | ![]() |
Out[2]= | ![]() |
Because 457 is the 88th prime, we consider the 87th and 89th primes:
In[3]:= | ![]() |
Out[3]= | ![]() |
In[4]:= | ![]() |
Out[4]= | ![]() |
Now, test that 457 is bigger than the average of these:
In[5]:= | ![]() |
Out[5]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License