Pell Identities

First we will define a Module that generates recursive sequences.

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