Lucas Sequences Un and Vn

The Lucas sequences U_n(P,Q) and V_n(P,Q) generalize Fibonacci, Lucas, Pell, and Jacobsthal numbers. They satisfy the same recurrence a_n = P·a_{n−1} − Q·a_{n−2} with different initial conditions.

U_n (Fibonacci-type, U_0=0,U_1=1)
V_n (Lucas-type, V_0=2,V_1=P)