<s>
More	O
generally	O
,	O
Lucas	B-Algorithm
sequences	I-Algorithm
and	O
represent	O
sequences	O
of	O
polynomials	O
in	O
and	O
with	O
integer	O
coefficients	O
.	O
</s>
<s>
Famous	O
examples	O
of	O
Lucas	B-Algorithm
sequences	I-Algorithm
include	O
the	O
Fibonacci	B-Algorithm
numbers	I-Algorithm
,	O
Mersenne	O
numbers	O
,	O
Pell	O
numbers	O
,	O
Lucas	B-Algorithm
numbers	I-Algorithm
,	O
Jacobsthal	B-Algorithm
numbers	I-Algorithm
,	O
and	O
a	O
superset	O
of	O
Fermat	O
numbers	O
(	O
see	O
below	O
)	O
.	O
</s>
<s>
Lucas	B-Algorithm
sequences	I-Algorithm
are	O
named	O
after	O
the	O
French	O
mathematician	O
Édouard	O
Lucas	O
.	O
</s>
<s>
Given	O
two	O
integer	O
parameters	O
and	O
,	O
the	O
Lucas	B-Algorithm
sequences	I-Algorithm
of	O
the	O
first	O
kind	O
and	O
of	O
the	O
second	O
kind	O
are	O
defined	O
by	O
the	O
recurrence	O
relations	O
:	O
</s>
<s>
The	O
above	O
relations	O
can	O
be	O
stated	O
in	O
matrix	B-Architecture
form	O
as	O
follows	O
:	O
</s>
<s>
Initial	O
terms	O
of	O
Lucas	B-Algorithm
sequences	I-Algorithm
and	O
are	O
given	O
in	O
the	O
table	O
:	O
</s>
<s>
The	O
characteristic	O
equation	O
of	O
the	O
recurrence	O
relation	O
for	O
Lucas	B-Algorithm
sequences	I-Algorithm
and	O
is	O
:	O
</s>
<s>
When	O
,	O
the	O
Lucas	B-Algorithm
sequences	I-Algorithm
and	O
satisfy	O
certain	O
Pell	O
equations	O
:	O
</s>
<s>
The	O
terms	O
of	O
Lucas	B-Algorithm
sequences	I-Algorithm
satisfy	O
relations	O
that	O
are	O
generalizations	O
of	O
those	O
between	O
Fibonacci	B-Algorithm
numbers	I-Algorithm
and	O
Lucas	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
Another	O
consequence	O
is	O
an	O
analog	O
of	O
exponentiation	B-Algorithm
by	I-Algorithm
squaring	I-Algorithm
that	O
allows	O
fast	O
computation	O
of	O
for	O
large	O
values	O
of	O
n	O
.	O
</s>
<s>
These	O
facts	O
are	O
used	O
in	O
the	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
Such	O
a	O
composite	O
is	O
called	O
a	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
.	O
</s>
<s>
A	O
prime	O
factor	O
of	O
a	O
term	O
in	O
a	O
Lucas	B-Algorithm
sequence	I-Algorithm
that	O
does	O
not	O
divide	O
any	O
earlier	O
term	O
in	O
the	O
sequence	O
is	O
called	O
primitive	O
.	O
</s>
<s>
Carmichael	B-Algorithm
's	I-Algorithm
theorem	I-Algorithm
states	O
that	O
all	O
but	O
finitely	O
many	O
of	O
the	O
terms	O
in	O
a	O
Lucas	B-Algorithm
sequence	I-Algorithm
have	O
a	O
primitive	O
prime	O
factor	O
.	O
</s>
<s>
The	O
Lucas	B-Algorithm
sequences	I-Algorithm
for	O
some	O
values	O
of	O
P	O
and	O
Q	O
have	O
specific	O
names	O
:	O
</s>
<s>
Some	O
Lucas	B-Algorithm
sequences	I-Algorithm
have	O
entries	O
in	O
the	O
On-Line	O
Encyclopedia	O
of	O
Integer	O
Sequences	O
:	O
</s>
<s>
Lucas	B-Algorithm
sequences	I-Algorithm
are	O
used	O
in	O
probabilistic	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
tests	O
,	O
which	O
are	O
part	O
of	O
the	O
commonly	O
used	O
Baillie	B-Algorithm
–	I-Algorithm
PSW	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
Lucas	B-Algorithm
sequences	I-Algorithm
are	O
used	O
in	O
some	O
primality	O
proof	O
methods	O
,	O
including	O
the	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
–	I-Algorithm
Riesel	I-Algorithm
test	I-Algorithm
,	O
and	O
the	O
N+1	O
and	O
hybrid	O
N−	O
1/N	O
+1	O
methods	O
such	O
as	O
those	O
in	O
Brillhart-Lehmer-Selfridge	O
1975	O
.	O
</s>
<s>
LUC	O
is	O
a	O
public-key	B-Application
cryptosystem	I-Application
based	O
on	O
Lucas	B-Algorithm
sequences	I-Algorithm
that	O
implements	O
the	O
analogs	O
of	O
ElGamal	B-Algorithm
(	O
LUCELG	O
)	O
,	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
(	O
LUCDIF	O
)	O
,	O
and	O
RSA	B-Architecture
(	O
LUCRSA	O
)	O
.	O
</s>
<s>
The	O
encryption	O
of	O
the	O
message	O
in	O
LUC	O
is	O
computed	O
as	O
a	O
term	O
of	O
certain	O
Lucas	B-Algorithm
sequence	I-Algorithm
,	O
instead	O
of	O
using	O
modular	O
exponentiation	O
as	O
in	O
RSA	B-Architecture
or	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
.	O
</s>
