The first terms of the Perrin sequence are 3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, 22, 29, 39, 51, 68, 90, 119, 158, 209, 277, 367, 486, 644 more terms
Lucas proved that if is a prime number, then divides .
The composites that show the same behaviour are quite rare and are called Perrin pseudoprimes. The first are 271441, 904631, 16532714, 24658561, 27422714, 27664033, 46672291, 102690901, 130944133, 196075949.