<s>
In	O
mathematics	O
,	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
is	O
a	O
general	O
algorithm	O
for	O
factoring	O
integers	O
into	O
prime	O
factors	O
.	O
</s>
<s>
It	O
is	O
a	O
special	O
case	O
of	O
the	O
general	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
.	O
</s>
<s>
While	O
it	O
is	O
less	O
efficient	B-General_Concept
than	O
the	O
general	O
algorithm	O
,	O
it	O
is	O
conceptually	O
simpler	O
.	O
</s>
<s>
It	O
serves	O
as	O
a	O
helpful	O
first	O
step	O
in	O
understanding	O
how	O
the	O
general	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
works	O
.	O
</s>
<s>
Suppose	O
we	O
are	O
trying	O
to	O
factor	O
the	O
composite	O
number	O
n	O
.	O
We	O
choose	O
a	O
bound	O
B	O
,	O
and	O
identify	O
the	O
factor	B-Algorithm
base	I-Algorithm
(	O
which	O
we	O
will	O
call	O
P	O
)	O
,	O
the	O
set	O
of	O
all	O
primes	O
less	O
than	O
or	O
equal	O
to	O
B	O
.	O
</s>
<s>
When	O
we	O
have	O
generated	O
enough	O
of	O
these	O
relations	O
(	O
it	O
's	O
generally	O
sufficient	O
that	O
the	O
number	O
of	O
relations	O
be	O
a	O
few	O
more	O
than	O
the	O
size	O
of	O
P	O
)	O
,	O
we	O
can	O
use	O
the	O
methods	O
of	O
linear	B-Language
algebra	I-Language
to	O
multiply	O
together	O
these	O
various	O
relations	O
in	O
such	O
a	O
way	O
that	O
the	O
exponents	O
of	O
the	O
primes	O
are	O
all	O
even	O
.	O
</s>
<s>
We	O
will	O
factor	O
the	O
integer	O
n	O
=	O
187	O
using	O
the	O
rational	B-Algorithm
sieve	I-Algorithm
.	O
</s>
<s>
We	O
'll	O
arbitrarily	O
try	O
the	O
value	O
B	O
=	O
7	O
,	O
giving	O
the	O
factor	B-Algorithm
base	I-Algorithm
P={2,3,5,7}	O
.	O
</s>
<s>
The	O
rational	B-Algorithm
sieve	I-Algorithm
,	O
like	O
the	O
general	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
,	O
cannot	O
factor	O
numbers	O
of	O
the	O
form	O
pm	O
,	O
where	O
p	O
is	O
a	O
prime	O
and	O
m	O
is	O
an	O
integer	O
.	O
</s>
<s>
The	O
advantage	O
of	O
the	O
general	B-Algorithm
number	I-Algorithm
field	I-Algorithm
sieve	I-Algorithm
is	O
that	O
one	O
need	O
only	O
search	O
for	O
smooth	O
numbers	O
of	O
order	O
n1/d	O
for	O
some	O
positive	O
integer	O
d	O
(	O
typically	O
3	O
or	O
5	O
)	O
,	O
rather	O
than	O
of	O
order	O
n	O
as	O
required	O
here	O
.	O
</s>
