This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

PrimeQCertificateCheck


gives True if cert is a valid certificate for the primality or compositeness of n, and False otherwise.
  • recognizes whether cert is a primality or compositeness certification, and then uses the certificate to verify the assertion.
  • The certificate cert should match the integer n.
A certificate of primality:
Check:
A certificate of compositeness:
Check:
A certificate need not come from . Here is the certificate generated by for :
A different certificate asserting that is composite:
Check:
Needs["PrimalityProving`"]
A certificate of primality:
In[2]:=
Click for copyable input
Out[2]=
Check:
In[3]:=
Click for copyable input
Out[3]=
 
Needs["PrimalityProving`"]
A certificate of compositeness:
In[2]:=
Click for copyable input
Out[2]=
Check:
In[3]:=
Click for copyable input
Out[3]=
 
Needs["PrimalityProving`"]
A certificate need not come from . Here is the certificate generated by for :
In[2]:=
Click for copyable input
Out[2]=
A different certificate asserting that is composite:
In[3]:=
Click for copyable input
Out[3]=
Check:
In[4]:=
Click for copyable input
Out[4]=