Tag Archives: primality

Modular exponentiation by repeated squaring

In my last post we saw how to quickly compute powers of the form by repeatedly squaring: ; then ; and so on. This is much more efficient than computing powers by repeated multiplication: for example, we need only three … Continue reading

Posted in computation, number theory | Tagged , , , , , , , | 2 Comments

Modular exponentiation

In my previous post I explained the Fermat primality test: Input: Repeat times: Randomly choose . If , stop and output COMPOSITE. Output PROBABLY PRIME. In future posts I’ll discuss how well this works, things to worry about, and so … Continue reading

Posted in computation, number theory | Tagged , , , | 1 Comment

The Fermat primality test

After several long tangents writing about orthogons and the chromatic number of the plane, I’m finally getting back to writing about primality testing. All along in this series, my ultimate goal has been to present some general primality testing algorithms … Continue reading

Posted in computation, number theory, primes | Tagged , , | 4 Comments

Fast and slow machines

In my previous post, I presented three hypothetical machines which take a positive integer as input and give us something else as output: a factorization machine gives us the complete prime factorization of ; a factor machine gives us one … Continue reading

Posted in computation, number theory, primes | Tagged , , , , , , , , , , | 1 Comment

New Mersenne prime

With impeccable timing, just in the middle of my series about primality testing, a new Mersenne prime has been announced, a little under two years after the previous one. In particular, it has been shown that is prime; this is … Continue reading

Posted in number theory, primes | Tagged , , , ,

A tale of three machines

The Fundamental Theorem of Arithmetic tells us that any positive integer can be factored into a product of prime factors.1 Given a positive integer , this leads naturally to several questions: What is the prime factorization of ? This is … Continue reading

Posted in computation, number theory, primes | Tagged , , , , | 11 Comments