A number is pseudo-prime if it is probably prime, the basis of which is the probabilistic Fermat test; if it passes two such tests, the chances are better than 3 out of 4 that n is prime.
the integer to test for pseudoprimality.
the number of Fermat tests to perform
This is an example function for making R packages and R
Whether the number is pseudoprime
Nicholas J. Matzke [email protected]
Abelson, Hal; Jerry Sussman, and Julie Sussman. Structure and Interpretation of Computer Programs. Cambridge: MIT Press, 1984.
is.pseudoprime(13, 4)# TRUE most of the time
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.