Perrin number


In mathematics, the Perrin numbers are defined by the recurrence relation
with initial values
The sequence of Perrin numbers starts with
The number of different maximal independent sets in an -vertex cycle graph is counted by the th Perrin number for.

History

This sequence was mentioned implicitly by Édouard Lucas. In 1899, the same sequence was mentioned explicitly by François Olivier Raoul Perrin. The most extensive treatment of this sequence was given by Adams and Shanks.

Properties

Generating function

The generating function of the Perrin sequence is

Matrix formula

Binet-like formula

The Perrin sequence numbers can be written in terms of powers of the roots of the equation
This equation has 3 roots; one real root p and two complex conjugate roots q and r. Given these three roots, the Perrin sequence analogue of the Lucas sequence Binet formula is
Since the magnitudes of the complex roots q and r are both less than 1, the powers of these roots approach 0 for large n. For large n the formula reduces to
This formula can be used to quickly calculate values of the Perrin sequence for large n. The ratio of successive terms in the Perrin sequence approaches p, a.k.a. the plastic number, which has a value of approximately 1.324718. This constant bears the same relationship to the Perrin sequence as the golden ratio does to the Lucas sequence. Similar connections exist also between p and the Padovan sequence, between the golden ratio and Fibonacci numbers, and between the silver ratio and Pell numbers.

Multiplication formula

From the Binet formula, we can obtain a formula for G in terms of G, G and G; we know
which gives us three linear equations with coefficients over the splitting field of ; by inverting a matrix we can solve for and then we can raise them to the kth power and compute the sum.
Example magma code:
P<x> := PolynomialRing);
S<t> := SplittingField;
P2<y> := PolynomialRing;
p,q,r := Explode;
Mi:=Matrix^;
T<u,v,w> := PolynomialRing;
v1 := ChangeRing *Matrix;
[p^i*v1[1,1]^3 + q^i*v1[2,1]^3 + r^i*v1[3,1]^3 : i in [-1..1]];
with the result that, if we have, then
The number 23 here arises from the discriminant of the defining polynomial of the sequence.
This allows computation of the nth Perrin number using integer arithmetic in multiplies.

Primes and divisibility

Perrin pseudoprimes

It has been proven that for all primes p, p divides P. However, the converse is not true: for some composite numbers n, n may still divide P. If n has this property, it is called a "Perrin pseudoprime".
The first few Perrin pseudoprimes are
The question of the existence of Perrin pseudoprimes was considered by Perrin himself, but it was not known whether they existed until Adams and Shanks discovered the smallest one, 271441 = 5212; the next-smallest is 904631 = 7 x 13 x 9941. There are seventeen of them less than a billion; Jon Grantham has proved that there are infinitely many Perrin pseudoprimes.
Adams and Shanks noted that primes also meet the condition that P = -1 mod p. Composites where both properties hold are called "restricted Perrin pseudoprimes". Further conditions can be applied using the six element signature of n which must be one of three forms.
While Perrin pseudoprimes are rare, they have significant overlap with Fermat pseudoprimes. This contrasts with the Lucas pseudoprimes which are anti-correlated. The latter condition is exploited to yield the popular, efficient, and more effective BPSW test which has no known pseudoprimes, and the smallest is known to be greater than 264.

Perrin primes

A Perrin prime is a Perrin number that is prime. The first few Perrin primes are:
For these Perrin primes, the index of is
Generating P where n is a negative integer yields a similar property regarding primality: if n is a negative, then P is prime when P mod -n = -n - 1. The following sequence represents P for all n that are negative integers: