The Perrin numbers, denoted by P*n*, are defined by a recurrence relation similar to that for the Fibonacci numbers:
P*n = Pn*‒2 + P*n*‒3 for n ≥ 3, with P0 = 3, P1 = 0 and P2 = 2.
The first terms below 200 are: 3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, 22, 29, 39, 51, 68, 90, 119 and 158.
These numbers play a role in number theory through the following theorem, which provides a primality criterion:
if n is a prime number, then n divides the Perrin number P*n*.
But the converse is false: there are composite numbers n that divide P*n. These spoilsports are known as Perrin pseudoprimes*. The smallest is 271,441 = 5212. A 2006 result shows that there are infinitely many.