The Perrin numbers have a definition analogous to Fibonacci numbers. Define P 0 = 3, P 1 = 0, and P 2 = 2. Then for n > 2, define

P n+3 = P n+1 + P n+0 .

The Concrete Tetrahedron says

It appears that n is prime “almost if and only if” P n mod n = 0.

The “only if” condition is true without qualification: if n is prime, P n mod n = 0. It’s the “if” part that’s almost true. When P n mod n = 0, n is usually prime. Composite numbers that satisfy the Perrin condition P n mod n = 0 are called Perrin pseudoprimes. The smallest Perrin pseudoprime is 271,441. The next is 904,631.

There are only 17 Perrin pseudoprimes less than a billion. By comparison, there are 50,847,534 primes less than a billion.

So if you used the Perrin condition to test whether numbers less than a billion are prime, you would correctly identify all 50,847,534 primes as primes. But out of the 949,152,466 composite numbers, you would falsely report 17 of these as prime. In other words, you would be 100% accurate in identifying primes as primes, but only 99.999998% accurate in identifying composite numbers as composite.

Related posts