In

_{''n''} can only be prime if ''n'' itself is prime, because if ''d'' is a divisor of ''n'' then ''P''_{''d''} is a divisor of ''P''_{''n''}.
The only Pell numbers that are squares, cubes, or any higher power of an integer are 0, 1, and 169 = 13^{2}.
However, despite having so few squares or other powers, Pell numbers have a close connection to square triangular numbers.Sesskin (1962). See the square triangular number article for a more detailed derivation. Specifically, these numbers arise from the following identity of Pell numbers:
:$\backslash bigl(\backslash left(P\_+P\_k\backslash right)\backslash cdot\; P\_k\backslash bigr)^2\; =\; \backslash frac.$
The left side of this identity describes a square number, while the right side describes a triangular number, so the result is a square triangular number.
Santana and Diaz-Barrero (2006) proved another identity relating Pell numbers to squares and showing that the sum of the Pell numbers up to ''P''_{4''n''+1} is always a square:
:$\backslash sum\_^\; P\_i\; =\; \backslash left(\backslash sum\_^n\; 2^r\backslash right)^2\; =\; \backslash left(P\_+P\_\backslash right)^2.$
For instance, the sum of the Pell numbers up to ''P''_{5}, , is the square of . The numbers forming the square roots of these sums,
:1, 7, 41, 239, 1393, 8119, 47321,… ,
are known as the Newman–Shanks–Williams number, Newman–Shanks–Williams (NSW) numbers.

_{n}'' is prime, it is necessary that n be either prime or a power of 2. The Pell–Lucas primes are
:3, 7, 17, 41, 239, 577,… .
For these ''n'' are
:2, 3, 4, 5, 7, 8, 16, 19, 29, 47, 59, 163, 257, 421,… .

_{S} = 1 + and its conjugate = 1 − .
:
The coefficients are the half-companion Pell numbers ''H_{n}'' and the Pell numbers ''P_{n}'' which are the (non-negative) solutions to .
A square triangular number is a number
:$N=\backslash frac=s^2,$
which is both the ''t''th triangular number and the ''s''th square number. A ''near-isosceles Pythagorean triple'' is an integer solution to where .
The next table shows that splitting the odd number ''H_{n}'' into nearly equal halves gives a square triangular number when ''n'' is even and a near isosceles Pythagorean triple when n is odd. All solutions arise in this manner.
:

_{n}'' and the Pell numbers ''P_{n}'' can be derived in a number of easily equivalent ways.

_{n}'' and ''P_{n}'' is
:$\backslash left(1-\backslash sqrt2\backslash right)^n\; \backslash approx\; (-0.41421)^n,$
which goes rapidly to zero. So
:$\backslash left(1+\backslash sqrt2\backslash right)^n=H\_n+P\_n\backslash sqrt2\backslash ,$
is extremely close to 2''H_{n}''.
From this last observation it follows that the integer ratios ' rapidly approach ; and and rapidly approach 1 + .

_{0} = 1 and ''P''_{0} = 0.

^{2} happens exactly when they are adjacent integers, one a square ''H''^{2} and the other twice a square 2''P''^{2}. Since we know all solutions of that equation, we also have
:$t\_n=\backslash begin2P\_n^2\&\backslash mboxn\backslash mbox;\backslash \backslash H\_^2\&\backslash mboxn\backslash mbox\backslash end$
and $s\_n=H\_nP\_n.$
This alternate expression is seen in the next table.
:

_{n}'' and are and while .

mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no general consensus abo ...

, the Pell numbers are an infinite sequence
In , a sequence is an enumerated collection of in which repetitions are allowed and matters. Like a , it contains (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called the ''length'' of the sequence. Unl ...

of integers
An integer (from the Latin
Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally spoken in the area around Rome, known as Latium. Through the power of t ...

, known since ancient times, that comprise the denominator
A fraction (from Latin
Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally spoken in the area around Rome, known as Latium. Through the power of the Rom ...

s of the closest rational approximations to the square root of 2. This sequence of approximations begins , , , , and , so the sequence of Pell numbers begins with 1, 2, 5, 12, and 29. The numerators of the same sequence of approximations are half the companion Pell numbers or Pell–Lucas numbers; these numbers form a second infinite sequence that begins with 2, 6, 14, 34, and 82.
Both the Pell numbers and the companion Pell numbers may be calculated by means of a recurrence relation similar to that for the Fibonacci numbers, and both sequences of numbers exponential growth, grow exponentially, proportionally to powers of the silver ratio 1 + . As well as being used to approximate the square root of two, Pell numbers can be used to find square triangular numbers, to construct integer approximations to the right isosceles triangle, and to solve certain combinatorial enumeration problems.
As with Pell's equation, the name of the Pell numbers stems from Leonhard Euler, Leonhard Euler's mistaken attribution of the equation and the numbers derived from it to John Pell. The Pell–Lucas numbers are also named after Édouard Lucas, who studied sequences defined by recurrences of this type; the Pell and companion Pell numbers are Lucas sequences.
Pell numbers

The Pell numbers are defined by the recurrence relation: :$P\_n=\backslash begin0\&\backslash mboxn=0;\backslash \backslash 1\&\backslash mboxn=1;\backslash \backslash 2P\_+P\_\&\backslash mbox\backslash end$ In words, the sequence of Pell numbers starts with 0 and 1, and then each Pell number is the sum of twice the previous Pell number and the Pell number before that. The first few terms of the sequence are :0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860,… . The Pell numbers can also be expressed by the closed form formula :$P\_n=\backslash frac.$ For large values of ''n'', the term dominates this expression, so the Pell numbers are approximately proportional to powers of the silver ratio , analogous to the growth rate of Fibonacci numbers as powers of the golden ratio. A third definition is possible, from the Matrix (mathematics), matrix formula :$\backslash begin\; P\_\; \&\; P\_n\; \backslash \backslash \; P\_n\; \&\; P\_\; \backslash end\; =\; \backslash begin\; 2\; \&\; 1\; \backslash \backslash \; 1\; \&\; 0\; \backslash end^n.$ Many identities can be derived or proven from these definitions; for instance an identity analogous to Cassini's identity for Fibonacci numbers, :$P\_P\_-P\_n^2\; =\; (-1)^n,$ is an immediate consequence of the matrix formula (found by considering the determinants of the matrices on the left and right sides of the matrix formula).Approximation to the square root of two

Pell numbers arise historically and most notably in the diophantine approximation, rational approximation to square root of 2, . If two large integers ''x'' and ''y'' form a solution to the Pell equation :$x^2-2y^2=\backslash pm\; 1,$ then their ratio ' provides a close approximation to . The sequence of approximations of this form is :$\backslash frac11,\; \backslash frac32,\; \backslash frac75,\; \backslash frac,\; \backslash frac,\; \backslash frac,\; \backslash dots$ where the denominator of each fraction is a Pell number and the numerator is the sum of a Pell number and its predecessor in the sequence. That is, the solutions have the form :$\backslash frac.$ The approximation :$\backslash sqrt\; 2\backslash approx\backslash frac$ of this type was known to Indian mathematicians in the third or fourth century B.C. The Greek mathematicians of the fifth century B.C. also knew of this sequence of approximations: Plato refers to the numerators as rational diameters. In the 2nd century CE Theon of Smyrna used the term the side and diameter numbers to describe the denominators and numerators of this sequence. These approximations can be derived from the continued fraction expansion of $\backslash scriptstyle\backslash sqrt\; 2$: :$\backslash sqrt\; 2\; =\; 1\; +\; \backslash cfrac.$ Truncating this expansion to any number of terms produces one of the Pell-number-based approximations in this sequence; for instance, :$\backslash frac\; =\; 1\; +\; \backslash cfrac.$ As Knuth (1994) describes, the fact that Pell numbers approximate allows them to be used for accurate rational approximations to a regular octagon with vertex coordinates and . All vertices are equally distant from the origin, and form nearly uniform angles around the origin. Alternatively, the points $(\backslash pm(P\_i+P\_),0)$, $(0,\backslash pm(P\_i+P\_))$, and $(\backslash pm\; P\_i,\backslash pm\; P\_i)$ form approximate octagons in which the vertices are nearly equally distant from the origin and form uniform angles.Primes and squares

A Pell prime is a Pell number that is prime number, prime. The first few Pell primes are :2, 5, 29, 5741, 33461, 44560482149, 1746860020068409, 68480406462161287469, ... . The indices of these primes within the sequence of all Pell numbers are :2, 3, 5, 11, 13, 29, 41, 53, 59, 89, 97, 101, 167, 181, 191, 523, 929, 1217, 1301, 1361, 2087, 2273, 2393, 8093, ... These indices are all themselves prime. As with the Fibonacci numbers, a Pell number ''P''Pythagorean triples

If a right triangle has integer side lengths ''a'', ''b'', ''c'' (necessarily satisfying the Pythagorean theorem ), then (''a'',''b'',''c'') is known as a Pythagorean triple. As Martin (1875) describes, the Pell numbers can be used to form Pythagorean triples in which ''a'' and ''b'' are one unit apart, corresponding to right triangles that are nearly isosceles. Each such triple has the form :$\backslash left(2P\_P\_,\; P\_^2\; -\; P\_^2,\; P\_^2\; +\; P\_^2=P\_\backslash right).$ The sequence of Pythagorean triples formed in this way is :(4,3,5), (20,21,29), (120,119,169), (696,697,985),…Pell–Lucas numbers

The companion Pell numbers or Pell–Lucas numbers are defined by the recurrence relation :$Q\_n=\backslash begin2\&\backslash mboxn=0;\backslash \backslash 2\&\backslash mboxn=1;\backslash \backslash 2Q\_+Q\_\&\backslash mbox\backslash end$ In words: the first two numbers in the sequence are both 2, and each successive number is formed by adding twice the previous Pell–Lucas number to the Pell–Lucas number before that, or equivalently, by adding the next Pell number to the previous Pell number: thus, 82 is the companion to 29, and The first few terms of the sequence are : 2 (number), 2, 2 (number), 2, 6 (number), 6, 14 (number), 14, 34 (number), 34, 82 (number), 82, 198 (number), 198, 478 (number), 478,… Like the relationship between Fibonacci numbers and Lucas numbers, :$Q\_n=\backslash frac$ for all natural numbers ''n''. The companion Pell numbers can be expressed by the closed form formula :$Q\_n=\backslash left(1+\backslash sqrt\; 2\backslash right)^n+\backslash left(1-\backslash sqrt\; 2\backslash right)^n.$ These numbers are all even; each such number is twice the numerator in one of the rational approximations to $\backslash scriptstyle\backslash sqrt\; 2$ discussed above. Like the Lucas sequence, if a Pell–Lucas number ''QComputations and connections

The following table gives the first few powers of the silver ratio ''δ'' = ''δ''Definitions

The half-companion Pell numbers ''HRaising to powers

:$\backslash left(1+\backslash sqrt2\backslash right)^n=H\_n+P\_n\backslash sqrt$ :$\backslash left(1-\backslash sqrt2\backslash right)^n=H\_n-P\_n\backslash sqrt.$ From this it follows that there are ''closed forms'': :$H\_n=\backslash frac.$ and :$P\_n\backslash sqrt2=\backslash frac.$Paired recurrences

:$H\_n=\backslash begin1\&\backslash mboxn=0;\backslash \backslash H\_+2P\_\&\backslash mbox\backslash end$ :$P\_n=\backslash begin0\&\backslash mboxn=0;\backslash \backslash H\_+P\_\&\backslash mbox\backslash end$Reciprocal recurrence formulas

Let n be at least 2. :$H\_n=(3P\_n-P\_)/2=3P\_+P\_$; :$P\_n=(3H\_n-H\_)/4=(3H\_+H\_)/2$.Matrix formulations

:$\backslash begin\; H\_n\; \backslash \backslash \; P\_n\; \backslash end\; =\; \backslash begin\; 1\; \&\; 2\; \backslash \backslash \; 1\; \&\; 1\; \backslash end\; \backslash begin\; H\_\; \backslash \backslash \; P\_\; \backslash end\; =\; \backslash begin\; 1\; \&\; 2\; \backslash \backslash \; 1\; \&\; 1\; \backslash end^n\; \backslash begin\; 1\; \backslash \backslash \; 0\; \backslash end.$ So :$\backslash begin\; H\_n\; \&\; 2P\_n\; \backslash \backslash \; P\_n\; \&\; H\_n\; \backslash end=\; \backslash begin\; 1\; \&\; 2\; \backslash \backslash \; 1\; \&\; 1\; \backslash end^n\; .$Approximations

The difference between ''H ''H''^{2} − 2''P''^{2} = ±1

Square triangular numbers

The required equation :$\backslash frac=s^2\backslash ,$ is equivalent to:$4t^2+4t+1=8s^2+1,$ which becomes with the substitutions ''H'' = 2''t'' + 1 and ''P'' = 2''s''. Hence the ''n''th solution is :$t\_n=\backslash frac\; \backslash quad\; \backslash mbox\; \backslash quad\; s\_n=\backslash frac.$ Observe that ''t'' and ''t'' + 1 are relatively prime, so that = ''s''Pythagorean triples

The equality occurs exactly when which becomes with the substitutions and . Hence the ''n''th solution is and . The table above shows that, in one order or the other, ''aNotes

References

* * * * * * * * * * * * * * * * * * *External links

* * —The numerators of the same sequence of approximations {{series (mathematics) Integer sequences Recurrence relations Unsolved problems in mathematics