0. Given an odd integer p to be tested for primality.
1. Choose a value P1 such that the Jacobi of D1=P12-4 is equal to 1 with respect to p.
2. Evaluate the two Lucas functions Up-1(P1,1) and Vp-1(P1, 1), both modulo p.
2(a). If these functions are not equal to 0 and 2 respectively, modulo p, then Exit (p is not a prime).
3. Choose a value P2 such that the Jacobi of D2=P22-4 is equal to -1 with respect to p.
4. Evaluate the two Lucas functions Up+1(P2, 1) and Vp+1(P2, 1), both modulo p.
4(a. If these functions are not equal to 0 and 2 respectively, modulo p, then Exit (p is not a prime).
5. Otherwise p is prime.
Example 4: CUL algorithm.
Back to Article