<s>
In	O
mathematics	O
,	O
the	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
–	I-Algorithm
Riesel	I-Algorithm
test	I-Algorithm
is	O
a	O
primality	B-Algorithm
test	I-Algorithm
for	O
numbers	O
of	O
the	O
form	O
N	O
=	O
k⋅2n1	O
(	O
Riesel	O
numbers	O
)	O
with	O
odd	O
k2n	O
.	O
</s>
<s>
The	O
test	O
was	O
developed	O
by	O
Hans	O
Riesel	O
and	O
it	O
is	O
based	O
on	O
the	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
For	O
numbers	O
of	O
the	O
form	O
N	O
=	O
k⋅2n+1	O
(	O
Proth	O
numbers	O
)	O
,	O
either	O
application	O
of	O
Proth	B-Algorithm
's	I-Algorithm
theorem	I-Algorithm
(	O
a	O
Las	O
Vegas	O
algorithm	O
)	O
or	O
one	O
of	O
the	O
deterministic	O
proofs	O
described	O
in	O
Brillhart-Lehmer-Selfridge	O
1975	O
(	O
see	O
Pocklington	B-Algorithm
primality	I-Algorithm
test	I-Algorithm
)	O
are	O
used	O
.	O
</s>
<s>
The	O
algorithm	O
is	O
very	O
similar	O
to	O
the	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
test	I-Algorithm
,	O
but	O
with	O
a	O
variable	O
starting	O
point	O
depending	O
on	O
the	O
value	O
of	O
k	O
.	O
</s>
<s>
This	O
is	O
a	O
generalization	O
of	O
the	O
ordinary	O
Lucas-Lehmer	B-Algorithm
test	I-Algorithm
,	O
and	O
reduces	O
to	O
it	O
when	O
k	O
=	O
1	O
.	O
</s>
<s>
The	O
starting	O
value	O
u0	O
will	O
be	O
the	O
Lucas	B-Algorithm
sequence	I-Algorithm
term	O
Vk(P,1 )	O
taken	O
modN	O
.	O
</s>
<s>
The	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
–	I-Algorithm
Riesel	I-Algorithm
test	I-Algorithm
is	O
a	O
particular	O
case	O
of	O
group-order	O
primality	B-Algorithm
testing	I-Algorithm
;	O
we	O
demonstrate	O
that	O
some	O
number	O
is	O
prime	O
by	O
showing	O
that	O
some	O
group	O
has	O
the	O
order	O
that	O
it	O
would	O
have	O
were	O
that	O
number	O
prime	O
,	O
and	O
we	O
do	O
this	O
by	O
finding	O
an	O
element	O
of	O
that	O
group	O
of	O
precisely	O
the	O
right	O
order	O
.	O
</s>
<s>
Following	O
the	O
model	O
of	O
the	O
Lucas	B-Algorithm
–	I-Algorithm
Lehmer	I-Algorithm
test	I-Algorithm
,	O
put	O
,	O
and	O
by	O
induction	O
we	O
have	O
.	O
</s>
<s>
If	O
a	O
satisfies	O
a	O
quadratic	O
equation	O
,	O
this	O
is	O
a	O
Lucas	B-Algorithm
sequence	I-Algorithm
,	O
and	O
has	O
an	O
expression	O
of	O
the	O
form	O
.	O
</s>
<s>
Really	O
,	O
we	O
're	O
looking	O
at	O
the	O
k⋅2ith	O
term	O
of	O
a	O
different	O
sequence	O
,	O
but	O
since	O
decimations	O
(	O
take	O
every	O
kth	O
term	O
starting	O
with	O
the	O
zeroth	O
)	O
of	O
a	O
Lucas	B-Algorithm
sequence	I-Algorithm
are	O
themselves	O
Lucas	B-Algorithm
sequences	I-Algorithm
,	O
we	O
can	O
deal	O
with	O
the	O
factor	O
k	O
by	O
picking	O
a	O
different	O
starting	O
point	O
.	O
</s>
<s>
LLR	O
is	O
a	O
program	O
that	O
can	O
run	O
the	O
LLR	B-Algorithm
tests	I-Algorithm
.	O
</s>
<s>
The	O
software	O
is	O
both	O
used	O
by	O
individual	O
prime	O
searchers	O
and	O
some	O
distributed	B-Architecture
computing	I-Architecture
projects	O
including	O
Riesel	B-Operating_System
Sieve	I-Operating_System
and	O
PrimeGrid	B-Operating_System
.	O
</s>
