How to Use
Enter P, Q, and n:
- U_n: First kind
- V_n: Second kind
- Sequences: Both displayed
Special Cases
P=1,Q=−1: Fibonacci/Lucas. P=2,Q=−1: Pell/Companion Pell. P=2,Q=1: trivial (U_n=n, V_n=2). P=1,Q=2: alternating. The discriminant D=P²−4Q determines the character of the sequences.
Primality Testing
Lucas primality test: if n has no factor ≤√n, and for some D, U_{n+1}≡0 (mod n) while U_{(n+1)/q}≢0 for all prime factors q of n+1, then n is prime. This generalizes Pocklington's test.
Step-by-Step Instructions
- 1Enter P and Q.
- 2Enter n.
- 3Compute U_n.
- 4Compute V_n.
- 5Check identities.