<s>
In	O
computational	O
number	O
theory	O
,	O
the	O
Lucas	O
test	O
is	O
a	O
primality	B-Algorithm
test	I-Algorithm
for	O
a	O
natural	O
number	O
n	O
;	O
it	O
requires	O
that	O
the	O
prime	O
factors	O
of	O
n	O
1	O
be	O
already	O
known	O
.	O
</s>
<s>
It	O
is	O
the	O
basis	O
of	O
the	O
Pratt	B-Algorithm
certificate	I-Algorithm
that	O
gives	O
a	O
concise	O
verification	O
that	O
n	O
is	O
prime	O
.	O
</s>
<s>
(	O
To	O
carry	O
out	O
these	O
modular	O
exponentiations	O
,	O
one	O
could	O
use	O
a	O
fast	O
exponentiation	O
algorithm	O
like	O
binary	B-Algorithm
or	O
addition-chain	O
exponentiation	O
)	O
.	O
</s>
<s>
The	O
algorithm	O
can	O
be	O
written	O
in	O
pseudocode	B-Language
as	O
follows	O
:	O
</s>
