Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test if a certificate can be used for ascertaining the primality or compositeness of a number
A certificate of primality:
In[1]:= | ![]() |
Out[1]= | ![]() |
Check:
In[2]:= | ![]() |
Out[2]= | ![]() |
A certificate of compositeness:
In[3]:= | ![]() |
Out[3]= | ![]() |
Check:
In[4]:= | ![]() |
Out[4]= | ![]() |
A certificate need not come from PrimeQCertificate. Here is the certificate generated by PrimeQCertificate for 3837523:
In[5]:= | ![]() |
Out[5]= | ![]() |
A different certificate asserting that 3837523 is composite:
In[6]:= | ![]() |
Out[6]= | ![]() |
Check:
In[7]:= | ![]() |
Out[7]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License