PrimeQCertificateCheck[cert,n]
gives True if cert is a valid certificate for the primality or compositeness of n, and False otherwise.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
PrimalityProving`
PrimalityProving`
PrimeQCertificateCheck
PrimeQCertificateCheck[cert,n]
gives True if cert is a valid certificate for the primality or compositeness of n, and False otherwise.
Details and Options
- To use PrimeQCertificateCheck, you first need to load the Primality Proving Package using Needs["PrimalityProving`"].
- PrimeQCertificateCheck 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.
Examples
Basic Examples (3)
Needs["PrimalityProving`"]PrimeQCertificate[1093]PrimeQCertificateCheck[%, 1093]Needs["PrimalityProving`"]A certificate of compositeness:
PrimeQCertificate[3837523]PrimeQCertificateCheck[%, 3837523]Needs["PrimalityProving`"]A certificate need not come from PrimeQCertificate. Here is the certificate generated by PrimeQCertificate for 3837523:
c1 = PrimeQCertificate[3837523]A different certificate asserting that 3837523 is composite:
c2 = {1488665, 2, 3837523}PrimeQCertificateCheck[c2, 3837523]