Tag Archives: test

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 , , , , , , , | 4 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 , , , | 2 Comments

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 , , | 5 Comments

Golden numbers are Fibonacci

This post is fourth in a series, proving the curious fact that is a Fibonacci number if and only if one (or both) of or is a perfect square; we call numbers of this form golden numbers. Last time, I … Continue reading

Posted in arithmetic, computation, famous numbers, fibonacci, proof | Tagged , , , , , | 2 Comments

Fibonacci numbers are golden

Recall that a “golden number” (this is not standard terminology) is a number such that one (or both) of or is a perfect square. In this post, I’ll explain Gessel’s proof that every Fibonacci number is golden. First, we need … Continue reading

Posted in arithmetic, computation, famous numbers, fibonacci, proof | Tagged , , , , , | 1 Comment

Testing Fibonacci numbers: the proofs

In my last post I stated this surprising theorem: is a Fibonacci number if and only if one of is a perfect square. If one of is a perfect square, then let’s say that is a “golden number” (a nod, … Continue reading

Posted in arithmetic, computation, famous numbers, fibonacci, proof | Tagged , , , | 1 Comment

Testing Fibonacci numbers

From a recent post on Brian Hayes’ blog, bit-player, I learned the following curious fact: is a Fibonacci number if and only if either or is a perfect square. Recall that the Fibonacci numbers begin where each number is the … Continue reading

Posted in arithmetic, computation, famous numbers, fibonacci | Tagged , , , | 8 Comments