PrimeQCertificateCheck

PrimeQCertificateCheck[cert,n]
gives True if cert is a valid certificate for the primality or compositeness of n, and False otherwise.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

In[1]:=
Click for copyable input

A certificate of primality:

In[2]:=
Click for copyable input
Out[2]=

Check:

In[3]:=
Click for copyable input
Out[3]=
In[1]:=
Click for copyable input

A certificate of compositeness:

In[2]:=
Click for copyable input
Out[2]=

Check:

In[3]:=
Click for copyable input
Out[3]=
In[1]:=
Click for copyable input

A certificate need not come from PrimeQCertificate. Here is the certificate generated by PrimeQCertificate 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]=
Translate this page: