Mathwords logoMathwords

Pell Sequence — Definition, Formula & Example

The Pell sequence is another name for the sequence of Pell numbers: 0, 1, 2, 5, 12, 29, 70, and so on. You get each new term by doubling the previous term and adding the one before that.

The Pell sequence (Pn)n≥0(P_n)_{n \ge 0} is the integer sequence defined by the second-order linear recurrence Pn=2Pn−1+Pn−2P_n = 2P_{n-1} + P_{n-2} with initial values P0=0P_0 = 0 and P1=1P_1 = 1. Its characteristic equation is x2=2x+1x^2 = 2x + 1, with roots 1±21 \pm \sqrt{2}. The sequence diverges to +∞+\infty, while the ratio Pn+1/PnP_{n+1}/P_n converges to 1+2≈2.4141 + \sqrt{2} \approx 2.414, called the silver ratio.

Key Formula

P0=0,P1=1,Pn=2Pn−1+Pn−2  (n≥2)Pn=(1+2)n−(1−2)n22P_0 = 0,\quad P_1 = 1,\quad P_n = 2P_{n-1} + P_{n-2}\ \ (n \ge 2) \qquad\qquad P_n = \frac{(1+\sqrt{2})^n - (1-\sqrt{2})^n}{2\sqrt{2}}
Where:
  • PnP_n = The Pell number in position n, counting from n = 0
  • nn = The index (position) of the term, a nonnegative integer
  • 1±21 \pm \sqrt{2} = Roots of the characteristic equation x² = 2x + 1. They are used in the closed form (Binet-style formula)

Worked Example

Problem: Find the Pell number P6P_6. Then use the fraction P5+P6P6\dfrac{P_5 + P_6}{P_6} to approximate 2\sqrt{2}.
Step 1: Start from P0=0P_0 = 0 and P1=1P_1 = 1. Apply the rule: double the latest term, then add the term before it.
P2=2(1)+0=2,  P3=2(2)+1=5,  P4=2(5)+2=12,  P5=2(12)+5=29,  P6=2(29)+12=70P_2 = 2(1) + 0 = 2,\; P_3 = 2(2) + 1 = 5,\; P_4 = 2(5) + 2 = 12,\; P_5 = 2(12) + 5 = 29,\; P_6 = 2(29) + 12 = 70
Step 2: Form the numerator P5+P6P_5 + P_6 and divide by P6P_6.
P5+P6P6=29+7070=9970≈1.414286\frac{P_5 + P_6}{P_6} = \frac{29 + 70}{70} = \frac{99}{70} \approx 1.414286
Step 3: Check how good the approximation is. The numbers 99 and 70 satisfy Pell's equation x2−2y2=1x^2 - 2y^2 = 1, so the square of 9970\tfrac{99}{70} is just barely above 2. Compare with 2≈1.414214\sqrt{2} \approx 1.414214: the error is less than 0.0001.
992−2⋅702=9801−9800=1⟹(9970)2=2+1490099^2 - 2 \cdot 70^2 = 9801 - 9800 = 1 \quad\Longrightarrow\quad \left(\tfrac{99}{70}\right)^2 = 2 + \tfrac{1}{4900}
Answer: P6=70P_6 = 70. The fraction 9970≈1.414286\tfrac{99}{70} \approx 1.414286 approximates 2≈1.414214\sqrt{2} \approx 1.414214 to within 0.0001.

Why It Matters

Pell numbers give the solutions of Pell's equation x2−2y2=±1x^2 - 2y^2 = \pm 1: take y=Pny = P_n and x=Pn+Pn−1x = P_n + P_{n-1}. Pell's equation is a standard topic in college number theory courses. The same pattern produces the best rational approximations to 2\sqrt{2}. In a discrete math course, the Pell sequence is a classic exercise in solving linear recurrences with the characteristic equation.

Common Mistakes

Mistake: Using the Fibonacci rule Pn=Pn−1+Pn−2P_n = P_{n-1} + P_{n-2} and forgetting to double the previous term.
Correction: The Pell rule is Pn=2Pn−1+Pn−2P_n = 2P_{n-1} + P_{n-2}. If your list reads 0, 1, 1, 2, 3, you have built the Fibonacci sequence. The Pell list must read 0, 1, 2, 5, 12.

Related Terms