Lucas Pseudoprime

DOWNLOAD Mathematica Notebook

When P and Q are integers such that D=P^2-4Q!=0, define the Lucas sequence {U_k} by

 U_k=(a^k-b^k)/(a-b)

for k>=0, with a and b the two roots of x^2-Px+Q=0. Then define a Lucas pseudoprime as an odd composite number n such that nQ, the Jacobi symbol (D/n)=-1, and n|U_(n+1).

The congruence L_n=1 (mod n) holds for every prime number n, where L_n is a Lucas number. However, some composites also satisfy this congruence. The Lucas pseudoprimes corresponding to the special case of the Lucas numbers L_n are those composite numbers n such that n|(L_n-1). The first few of these are 705, 2465, 2737, 3745, 4181, 5777, 6721, ... (OEIS A005845).

The Wolfram Language implements the multiple Rabin-Miller test in bases 2 and 3 combined with a Lucas pseudoprime test as the primality test in the function PrimeQ[n].

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.