Perrin number

Last updated
Spiral of equilateral triangles with side lengths equal to Perrin numbers. Perrin triangles.png
Spiral of equilateral triangles with side lengths equal to Perrin numbers.

In mathematics, the Perrin numbers are a doubly infinite constant-recursive integer sequence with characteristic equation x3 = x + 1. The Perrin numbers bear the same relationship to the Padovan sequence as the Lucas numbers do to the Fibonacci sequence.

Contents

Definition

The Perrin numbers are defined by the recurrence relation

and the reverse

The first few terms in both directions are

n01234567891011121314151617
P(n)30232557101217222939516890119... [1]
P(−n)...−112−34−2−15−76−1−612−1375−18... [2]

Perrin numbers can be expressed as sums of the three initial terms

The first fourteen prime Perrin numbers are

n2345671012202124343875... [3]
P(n)232557172927736785314197437211442968193... [4]

History

In 1876 the sequence and its equation were initially mentioned by Édouard Lucas, who noted that the index n divides term P(n) if n is prime. [5] In 1899 Raoul Perrin asked if there were any counterexamples to this property. [6] The first P(n) divisible by composite index n was found only in 1982 by William Adams and Daniel Shanks. [7] They presented a detailed investigation of the sequence, with a sequel appearing four years later. [8]

Properties

A Perrin microcosm: the escape time algorithm is applied to the Newton map of the entire Perrin function F(z) around critical point z = 1.225432 with viewport width 0.05320. The basins of attraction emanating from the centre correspond to the infinite number of real (left) and complex roots (right) F(z) = 0. Perrin function Newton map.png
A Perrin microcosm: the escape time algorithm is applied to the Newton map of the entire Perrin function F(z) around critical point z = 1.225432 with viewport width 0.05320. The basins of attraction emanating from the centre correspond to the infinite number of real (left) and complex roots (right) F(z) = 0.

The Perrin sequence also satisfies the recurrence relation Starting from this and the defining recurrence, one can create an infinite number of further relations, for example

The generating function of the Perrin sequence is

The sequence is related to sums of binomial coefficients by

[1]

Perrin numbers can be expressed in terms of partial sums

The Perrin numbers are obtained as integral powers n ≥ 0 of the matrix

and its inverse

The Perrin analogue of the Simson identity for Fibonacci numbers is given by the determinant

The number of different maximal independent sets in an n-vertex cycle graph is counted by the nth Perrin number for n ≥ 2. [9]

Binet formula

The Perrin function extends the sequence to real numbers. Perrin function real.svg
The Perrin function extends the sequence to real numbers.

The solution of the recurrence can be written in terms of the roots of characteristic equation . If the three solutions are real root (with approximate value 1.324718 and known as the plastic ratio) and complex conjugate roots and , the Perrin numbers can be computed with the Binet formula which also holds for negative n.

The polar form is with Since the formula reduces to either the first or the second term successively for large positive or negative n, and numbers with negative subscripts oscillate. Provided α is computed to sufficient precision, these formulas can be used to calculate Perrin numbers for large n.

Expanding the identity gives the important index-doubling rule by which the forward and reverse parts of the sequence are linked.

Prime index p divides P(p)

If the characteristic equation of the sequence is written as then the coefficients can be expressed in terms of roots with Vieta's formulas:

These integer valued functions are the elementary symmetric polynomials in

Given integers a, b, c and n > 0,

Rearrange into symmetric monomial summands, permuting exponents i, j, k:

Substitute prime for power and complex roots for integers and compute representations in terms of for all symmetric polynomial functions. For example, is and the power sum can be expressed in the coefficients with Newton's recursive scheme. It follows that the identity has integer terms and both sides divisible by prime

To show that prime divides in the reverse sequence, the characteristic equation has to be reflected. The roots are then the coefficients and the same reasoning applies.

Perrin primality test

Query 1484. The curious proposition of Chinese origin which is the subject of query 1401 [10] would provide, if it is true, a more practical criterium than Wilson's theorem for verifying whether a given number m is prime or not; it would suffice to calculate the residues with respect to m of successive terms of the recurrence sequence
un = 3un−1 − 2un−2 with initial values u0 = −1, u1 = 0. [11]
I have found another recurrence sequence that seems to possess the same property; it is the one whose general term is
vn = vn−2 + vn−3 with initial values v0 = 3, v1 = 0, v2 = 2. It is easy to demonstrate that vn is divisible by n, if n is prime; I have verified, up to fairly high values of n, that in the opposite case it is not; but it would be interesting to know if this is really so, especially since the sequence vn gives much less rapidly increasing numbers than the sequence un (for n = 17, for example, one finds un = 131070, vn = 119), which leads to simpler calculations when n is a large number.
The same proof, applicable to one of the sequences, will undoubtedly bear upon the other, if the stated property is true for both: it is only a matter of discovering it. [12]

The Perrin sequence has the Fermat property: if p is prime, P(p) ≡ P(1) ≡ 0 (mod p). However, the converse is not true: some composite n may still divide P(n). A number with this property is called a Perrin pseudoprime.

The question of the existence of Perrin pseudoprimes was considered by Malo and Jarden, [13] but none were known until Adams and Shanks found the smallest one, 271441 = 5212 (the number P(271441) has 33150 decimal digits). [14] Jon Grantham later proved that there are infinitely many Perrin pseudoprimes. [15]

The seventeen Perrin pseudoprimes below 109 are

271441, 904631, 16532714, 24658561, 27422714, 27664033, 46672291, 102690901, 130944133, 196075949, 214038533, 517697641, 545670533, 801123451, 855073301, 903136901, 970355431. [16]

Adams and Shanks noted that primes also satisfy the congruence P(−p) ≡ P(−1) ≡ −1 (mod p). Composites for which both properties hold are called restricted Perrin pseudoprimes. There are only nine such numbers below 109. [17] [18] [19]

While Perrin pseudoprimes are rare, they overlap with Fermat pseudoprimes. Of the above seventeen numbers, four are base 2 Fermatians as well. In contrast, the Lucas pseudoprimes are anti-correlated. [20] Presumably, combining the Perrin and Lucas tests should make a primality test as strong as the reliable BPSW test which has no known pseudoprimes – though at higher computational cost.

Pseudocode

The 1982 Adams and Shanks O(log n) Perrin primality test. [21]

Two integer arrays u(3) and v(3) are initialized to the lowest terms of the Perrin sequence, with positive indices t = 0, 1, 2 in u( ) and negative indices t = 0,−1,−2 in v( ).

The main double-and-add loop, originally devised to run on an HP-41C pocket calculator, computes P(n) mod n and the reverse P(−n) mod n at the cost of six modular squarings for each bit of n.

The subscripts of the Perrin numbers are doubled using the identity P(2t) = P2(t) − 2P(−t). The resulting gaps between P(±2t) and P(±2t ± 2) are closed by applying the defining relation P(t) = P(t − 2) + P(t − 3).

Initial valuesletint u(0):= 3, u(1):= 0, u(2):= 2letint v(0):= 3, v(1):=−1, v(2):= 1Test odd positive number ninputint n       setint h:= most significant bit of n       for k:= h − 1 downto 0         Double the indices ofthe six Perrin numbers.for i = 0, 1, 2     temp:= u(i)^2 − 2v(i) (mod n)     v(i):= v(i)^2 − 2u(i) (mod n)     u(i):= temp   endforCopy P(2t + 2) and P(−2t − 2)to the array ends and usein the if-statement below.   u(3):= u(2)   v(3):= v(2)         Overwrite P(2t ± 2) with P(2t ± 1)   temp:= u(2) − u(1)   u(2):= u(0) + temp   u(0):= temp         Overwrite P(−2t ± 2) with P(−2t ± 1)   temp:= v(0) − v(1)   v(0):= v(2) + temp   v(2):= temp         if n has bit k set thenIncrease the indices ofboth Perrin triples by 1.for i = 0, 1, 2       u(i):= u(i + 1)       v(i):= v(i + 1)     endforendifendforResultprint v(2), v(1), v(0) print u(0), u(1), u(2)

Successively P(−n − 1), P(−n), P(−n + 1) and P(n − 1), P(n), P(n + 1) (mod n).

If P(−n) = −1 and P(n) = 0 then n is a probable prime, that is: actually prime or a restricted Perrin pseudoprime.

Shanks et al. observed that for all restricted pseudoprimes they found, the final state of the above six registers (the "signature" of n) equals the initial state 1,−1,3, 3,0,2. [22] The same occurs with ≈ 1/6 of all primes, so the two sets cannot be distinguished on the strength of this test alone. [23] For those cases, they recommend to also use the Narayana-Lucas sister sequence with recurrence relation A(n) = A(n − 1) + A(n − 3) and initial values

u(0):= 3, u(1):= 1, u(2):= 1 v(0):= 3, v(1):= 0, v(2):=−2

The same doubling rule applies and the formulas for filling the gaps are

temp:= u(0) + u(1) u(0):= u(2) − temp u(2):= temp       temp:= v(2) + v(1) v(2):= v(0) − temp v(0):= temp

Here, n is a probable prime if A(−n) = 0 and A(n) = 1.

Kurtz et al. found no overlap between the odd pseudoprimes for the two sequences below 50∙109 and supposed that 2,277,740,968,903 = 1067179 ∙ 2134357 is the smallest composite number to pass both tests. [24]

If the third-order Pell-Lucas recurrence A(n) = 2A(n − 1) + A(n − 3) is used as well, this bound will be pushed up to 4,057,052,731,496,380,171 = 1424263447 ∙ 2848526893. [25]

Additionally, roots of the doubling rule-congruence other than −1 or 3 expose composite numbers, like non-trivial square roots of 1 in the Miller-Rabin test. [26] This reduces the number of restricted pseudoprimes for each sequence by roughly one-third and is especially efficient in detecting Carmichael numbers. [27]

The least strong restricted Perrin pseudoprime is 46672291 and the above two bounds expand to successively 173,536,465,910,671 and 79,720,990,309,209,574,421. [28]

Notes

  1. 1 2 Sloane, N. J. A. (ed.). "SequenceA001608(Perrin sequence (or Ondrej Such sequence): a(n) = a(n-2) + a(n-3) with a(0) = 3, a(1) = 0, a(2) = 2)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  2. Sloane, N. J. A. (ed.). "SequenceA078712(Series expansion of (-3 - 2*x)/(1 + x - x^3) in powers of x)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  3. Sloane, N. J. A. (ed.). "SequenceA112881(Indices of prime Perrin numbers; values of n such that A001608(n) is prime)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  4. Sloane, N. J. A. (ed.). "SequenceA074788(Prime numbers in the Perrin sequence b(n+1) = b(n-1) + b(n-2) with initial values b(1)=3, b(2)=0, b(3)=2)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  5. Lucas (1878)
  6. Perrin (1899)
  7. Adams & Shanks (1982)
  8. Kurtz, Shanks & Williams (1986)
  9. Füredi (1987)
  10. Tarry (1898)
  11. Sloane, N. J. A. (ed.). "SequenceA000918(a(n) = 2^n - 2)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  12. Perrin (1899) translated from the French
  13. Malo (1900) , Jarden (1966)
  14. Adams & Shanks (1982 , p. 255)
  15. Grantham (2010), Stephan (2020)
  16. Sloane, N. J. A. (ed.). "SequenceA013998(Unrestricted Perrin pseudoprimes)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  17. Sloane, N. J. A. (ed.). "SequenceA018187(Restricted Perrin pseudoprimes)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  18. Sloane, N. J. A. (ed.). "SequenceA275612(Restricted Perrin pseudoprimes (Adams and Shanks definition))". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  19. Sloane, N. J. A. (ed.). "SequenceA275613(Restricted Perrin pseudoprimes (Grantham definition).)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.
  20. None of the 2402549 Lucas-Selfridge pseudoprimes below 1015 listed by Dana Jacobsen (2020) is also a Perrin pseudoprime.
  21. Adams & Shanks (1982 , p. 265, 269-270)
  22. Adams & Shanks (1982 , p. 275), Kurtz, Shanks & Williams (1986 , p. 694). This was later confirmed for n < 1014 by Steven Arno (1991).
  23. The signature does give discriminating information on the remaining two types of primes. For example, the smallest Q-type pseudoprime 50,972,694,899,204,437,633 computed by Holger Stephan (2019) is exposed by signature conditions 14a and 14c in Adams & Shanks (1982 , p. 257).
  24. Kurtz, Shanks & Williams (1986 , p. 697)
  25. Stephan (2019)
  26. Adams & Shanks (1982 , p. 280-283)
  27. A C/C++ implementation of the extended Perrin test can be found in the final subsection of a previous version of this article.
  28. Stephan (2019)

Related Research Articles

<span class="mw-page-title-main">Pauli matrices</span> Matrices important in quantum mechanics and the study of spin

In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices that are Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma, they are occasionally denoted by tau when used in connection with isospin symmetries.

In particle physics, the Dirac equation is a relativistic wave equation derived by British physicist Paul Dirac in 1928. In its free form, or including electromagnetic interactions, it describes all spin-12 massive particles, called "Dirac particles", such as electrons and quarks for which parity is a symmetry. It is consistent with both the principles of quantum mechanics and the theory of special relativity, and was the first theory to account fully for special relativity in the context of quantum mechanics. It was validated by accounting for the fine structure of the hydrogen spectrum in a completely rigorous way.

<span class="mw-page-title-main">Simplex</span> Multi-dimensional generalization of triangle

In geometry, a simplex is a generalization of the notion of a triangle or tetrahedron to arbitrary dimensions. The simplex is so-named because it represents the simplest possible polytope in any given dimension. For example,

<span class="mw-page-title-main">Permutation</span> Mathematical version of an order change

In mathematics, a permutation of a set can mean one of two different things:

In mechanics and geometry, the 3D rotation group, often denoted SO(3), is the group of all rotations about the origin of three-dimensional Euclidean space under the operation of composition.

<span class="mw-page-title-main">Lindemann–Weierstrass theorem</span> On algebraic independence of exponentials of linearly independent algebraic numbers over Q

In transcendental number theory, the Lindemann–Weierstrass theorem is a result that is very useful in establishing the transcendence of numbers. It states the following:

In combinatorial mathematics, the necklace polynomial, or Moreau's necklace-counting function, introduced by C. Moreau, counts the number of distinct necklaces of n colored beads chosen out of α available colors, arranged in a cycle. Unlike the usual problem of graph coloring, the necklaces are assumed to be aperiodic, and counted up to rotation, but without flipping over. This counting function also describes the dimensions in a free Lie algebra and the number of irreducible polynomials over a finite field.

In field theory, the primitive element theorem states that every finite separable field extension is simple, i.e. generated by a single element. This theorem implies in particular that all algebraic number fields over the rational numbers, and all extensions in which both fields are finite, are simple.

In mathematics, the Riemann–Liouville integral associates with a real function another function Iαf of the same kind for each value of the parameter α > 0. The integral is a manner of generalization of the repeated antiderivative of f in the sense that for positive integer values of α, Iαf is an iterated antiderivative of f of order α. The Riemann–Liouville integral is named for Bernhard Riemann and Joseph Liouville, the latter of whom was the first to consider the possibility of fractional calculus in 1832. The operator agrees with the Euler transform, after Leonhard Euler, when applied to analytic functions. It was generalized to arbitrary dimensions by Marcel Riesz, who introduced the Riesz potential.

In differential topology, the jet bundle is a certain construction that makes a new smooth fiber bundle out of a given smooth fiber bundle. It makes it possible to write differential equations on sections of a fiber bundle in an invariant form. Jets may also be seen as the coordinate free versions of Taylor expansions.

In mathematics, the Smith normal form is a normal form that can be defined for any matrix with entries in a principal ideal domain (PID). The Smith normal form of a matrix is diagonal, and can be obtained from the original matrix by multiplying on the left and right by invertible square matrices. In particular, the integers are a PID, so one can always calculate the Smith normal form of an integer matrix. The Smith normal form is very useful for working with finitely generated modules over a PID, and in particular for deducing the structure of a quotient of a free module. It is named after the Irish mathematician Henry John Stephen Smith.

<span class="mw-page-title-main">Practical number</span> Number such that it and all smaller numbers may be represented as sums of its distinct divisors

In number theory, a practical number or panarithmic number is a positive integer such that all smaller positive integers can be represented as sums of distinct divisors of . For example, 12 is a practical number because all the numbers from 1 to 11 can be expressed as sums of its divisors 1, 2, 3, 4, and 6: as well as these divisors themselves, we have 5 = 3 + 2, 7 = 6 + 1, 8 = 6 + 2, 9 = 6 + 3, 10 = 6 + 3 + 1, and 11 = 6 + 3 + 2.

<span class="mw-page-title-main">Chiral model</span> Model of mesons in the massless quark limit

In nuclear physics, the chiral model, introduced by Feza Gürsey in 1960, is a phenomenological model describing effective interactions of mesons in the chiral limit (where the masses of the quarks go to zero), but without necessarily mentioning quarks at all. It is a nonlinear sigma model with the principal homogeneous space of a Lie group as its target manifold. When the model was originally introduced, this Lie group was the SU(N), where N is the number of quark flavors. The Riemannian metric of the target manifold is given by a positive constant multiplied by the Killing form acting upon the Maurer–Cartan form of SU(N).

<span class="mw-page-title-main">Two-state quantum system</span> Simple quantum mechanical system

In quantum mechanics, a two-state system is a quantum system that can exist in any quantum superposition of two independent quantum states. The Hilbert space describing such a system is two-dimensional. Therefore, a complete basis spanning the space will consist of two independent states. Any two-state system can also be seen as a qubit.

In mathematical physics, the gamma matrices, also called the Dirac matrices, are a set of conventional matrices with specific anticommutation relations that ensure they generate a matrix representation of the Clifford algebra It is also possible to define higher-dimensional gamma matrices. When interpreted as the matrices of the action of a set of orthogonal basis vectors for contravariant vectors in Minkowski space, the column vectors on which the matrices act become a space of spinors, on which the Clifford algebra of spacetime acts. This in turn makes it possible to represent infinitesimal spatial rotations and Lorentz boosts. Spinors facilitate spacetime computations in general, and in particular are fundamental to the Dirac equation for relativistic spin particles. Gamma matrices were introduced by Paul Dirac in 1928.

<span class="mw-page-title-main">Covariant formulation of classical electromagnetism</span> Ways of writing certain laws of physics

The covariant formulation of classical electromagnetism refers to ways of writing the laws of classical electromagnetism in a form that is manifestly invariant under Lorentz transformations, in the formalism of special relativity using rectilinear inertial coordinate systems. These expressions both make it simple to prove that the laws of classical electromagnetism take the same form in any inertial coordinate system, and also provide a way to translate the fields and forces from one frame to another. However, this is not as general as Maxwell's equations in curved spacetime or non-rectilinear coordinate systems.

The quantum Heisenberg model, developed by Werner Heisenberg, is a statistical mechanical model used in the study of critical points and phase transitions of magnetic systems, in which the spins of the magnetic systems are treated quantum mechanically. It is related to the prototypical Ising model, where at each site of a lattice, a spin represents a microscopic magnetic dipole to which the magnetic moment is either up or down. Except the coupling between magnetic dipole moments, there is also a multipolar version of Heisenberg model called the multipolar exchange interaction.

Within computer engineering and computer science, a computer for operations with (mathematical) functions operates with functions at the hardware level.

In mathematics and mechanics, the Euler–Rodrigues formula describes the rotation of a vector in three dimensions. It is based on Rodrigues' rotation formula, but uses a different parametrization.

<span class="mw-page-title-main">Supersilver ratio</span> Algebraic integer, approximately 2.20557

In mathematics, the supersilver ratio is a geometrical proportion close to 75/34. Its true value is the real solution of the equation x3 = 2x2 + 1.

References