Suppose you define a numerical sequence as follows:
Stop and generate the first 20 numbers in this sequence. You might note that for n>1, if n divides P(n), then n is a prime number. Check this claim using your set of 30 numbers.
- P(0) = 3
- P(1) = 0
- P(2) = 2
- P(n) = P(n-2) + P(n-3) for n>2
But is this always true?
Oddly, the best theorem possible is: For all 1 < n <271,441, if n divides P(n), then n is prime.
The pattern breaks down for n = 271,441, as n then divides the 33,150-digit number P(271,441), yet n is not prime as 271,441 = 5212.
As one author wrote: "Mathematics is full of sly surprises. You need to be paranoid when you do math research...(the) MORAL: In math, checking a few hundred thousand cases never tells you everything."
As a final note, this special sequence is called the Perrin function. The converse situation has been proven true, in that if n is prime, it must divide P(n).
I first learned about this sequence from Charles Wells, and later discovered that the sequence has a rich history via Kevin Brown, such as its geometrical connection to nested equilateral triangles and its further generalization.