### Basic Examples

Basic Examples

A certificate that can be used to prove that is a prime:

1093

[1093]

In[]:=

{1093,5,{2,{3,2,{2}},{7,3,{2,{3,2,{2}}}},{13,2,{2,{3,2,{2}}}}}}

Out[]=

The same certificate can be obtained by using with the option :

ProvablePrimeQ

"Certificate"->

ResourceFunction["ProvablePrimeQ"][1093,"Certificate"->True]

In[]:=

{True,{1093,5,{2,{3,2,{2}},{7,3,{2,{3,2,{2}}}},{13,2,{2,{3,2,{2}}}}}}}

Out[]=

A certificate that can be used to prove that is composite:

1093×3511

[1093×3511]

In[]:=

{2,3837522,3837523}

Out[]=

The output is a list of three integers that indicate is composite, and that it violates Fermat's little theorem for primes, if is prime:

1093×3511

2≡1modp

p-1

p

PowerMod@@%

In[]:=

3134697

Out[]=