Pell Numbers

First we will define a Module that generates recursive sequences.

generateSequences[n_, val0_, val1_]:=Module[{seq={val0, val1}, a=val0, b=val1,next, m=2},
If[n ≤ 1, Return[seq]];
Do[
next=m*b+a;            (* compute the next value *)
seq=Append[seq,next];     (* append to the sequence *)
a=b;     (* shift *)
b=next;      (* shift *)
,{i,2,n}];
seq                           (* return the sequence *)
]

For example, we can generate the first ten terms of the Pell sequence:

generateSequences[15,0,1]

generateSequences[6,0,1]

Or we can generate the first ten terms of the Pell-Lucas sequence:

generateSequences[10,2,2]

Generate a long list of Pell numbers:

pellSeq=generateSequences[1000,0,1];

The first Pell number is usually denoted (Subscript[P, 0]). Let’s adjust our indexing to match things up:

P[n_]:=pellSeq[[n+1]]

{P[0],P[1],P[2],P[3]}

A Cool Pell Identity

Consider:

{
P/@Range[0,18,3],   (* every third Pell number *)
(P/@Range[0,6])^3,   (* cube of every Pell number *)
P/@Range[0,6]         (* just the Pell numbers *)
} // Transpose // TableForm

Let's look for a pattern of the following form: (Subscript[P, 3n])=((a((Subscript[P, n])))^3)+b (Subscript[P, n]) for even numbers n. How can we find a and b? Let’s write two equations and solve for a and b.

eq1=P[3*2]==a(P[2])^3+b*P[2]   (* n=2 case *)
eq2=P[3*4]==a(P[4])^3+b*P[4]   (* n=4 case *)

eq1

sol=Solve[{eq1,eq2},{a,b}]

We found a and b for two equations, but now let’s check that (Subscript[P, 3n])=((a((Subscript[P, n])))^3)+b (Subscript[P, n]) holds for a=8 and b=3 for LOTS of even values of n.

lhs=Table[ P[3n],{n,0,100,2}];
rhs=Table[a*P[n]^3+b*P[n],{n,0,100,2}] /.sol[[1]];

lhs==rhs

Next Steps:

Extend the previous verification to odd values of n:    (Subscript[P, 3n])=8((((Subscript[P, n])))^3)+(((-1))^n)3 (Subscript[P, n])

Generalize! Is there an identity for (Subscript[P, 5n])? How about (Subscript[P, 5n])=((a((Subscript[P, n])))^5)+b ((((Subscript[P, n])))^3)+c (Subscript[P, n])?