<s>
Wheel	B-Algorithm
factorization	I-Algorithm
is	O
an	O
improvement	O
of	O
the	O
trial	B-Algorithm
division	I-Algorithm
method	O
for	O
integer	O
factorization	O
.	O
</s>
<s>
The	O
trial	B-Algorithm
division	I-Algorithm
method	O
consists	O
of	O
dividing	O
the	O
number	O
to	O
be	O
factorized	O
successively	O
by	O
the	O
first	O
integers	O
(	O
2	O
,	O
3	O
,	O
4	O
,	O
5	O
,	O
...	O
)	O
until	O
finding	O
a	O
divisor	O
.	O
</s>
<s>
For	O
wheel	B-Algorithm
factorization	I-Algorithm
,	O
one	O
starts	O
from	O
a	O
small	O
list	O
of	O
numbers	O
,	O
called	O
the	O
basis	O
—	O
generally	O
the	O
first	O
few	O
prime	O
numbers	O
;	O
then	O
one	O
generates	O
the	O
list	O
,	O
called	O
the	O
wheel	O
,	O
of	O
the	O
integers	O
that	O
are	O
coprime	O
with	O
all	O
numbers	O
of	O
the	O
basis	O
.	O
</s>
<s>
With	O
the	O
basis	O
{	O
2	O
,	O
3}	O
,	O
this	O
method	O
reduces	O
the	O
number	O
of	O
divisions	O
to	O
of	O
the	O
number	O
necessary	O
for	O
trial	B-Algorithm
division	I-Algorithm
.	O
</s>
<s>
Wheel	B-Algorithm
factorization	I-Algorithm
is	O
used	O
for	O
generating	O
lists	O
of	O
mostly	O
prime	O
numbers	O
from	O
a	O
simple	O
mathematical	O
formula	O
and	O
a	O
much	O
smaller	O
list	O
of	O
the	O
first	O
prime	O
numbers	O
.	O
</s>
<s>
These	O
lists	O
may	O
then	O
be	O
used	O
in	O
trial	B-Algorithm
division	I-Algorithm
or	O
sieves	O
.	O
</s>
<s>
Much	O
definitive	O
work	O
on	O
wheel	B-Algorithm
factorization	I-Algorithm
,	O
sieves	O
using	O
wheel	B-Algorithm
factorization	I-Algorithm
,	O
and	O
wheel	O
sieve	O
,	O
was	O
done	O
by	O
Paul	O
Pritchard	O
in	O
formulating	O
a	O
series	O
of	O
different	O
algorithms	O
.	O
</s>
<s>
They	O
are	O
known	O
or	O
perhaps	O
determined	O
from	O
previous	O
applications	O
of	O
smaller	O
factorization	O
wheels	O
or	O
by	O
quickly	O
finding	O
them	O
using	O
the	B-Algorithm
Sieve	I-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
.	O
</s>
<s>
This	O
composite	O
number	O
elimination	O
can	O
be	O
accomplished	O
either	O
by	O
use	O
of	O
a	O
sieve	O
such	O
as	O
the	B-Algorithm
Sieve	I-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
or	O
as	O
the	O
result	O
of	O
applications	O
of	O
smaller	O
factorization	O
wheels	O
.	O
</s>
<s>
Use	O
other	O
methods	O
such	O
as	O
the	B-Algorithm
Sieve	I-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
or	O
further	O
application	O
of	O
larger	O
factorization	O
wheels	O
to	O
remove	O
the	O
remaining	O
non-primes	O
.	O
</s>
<s>
Note	O
that	O
once	O
a	O
wheel	O
spans	O
the	O
desired	O
upper	O
limit	O
of	O
the	O
sieving	O
range	O
,	O
one	O
can	O
stop	O
generating	O
further	O
wheels	O
and	O
use	O
the	O
information	O
in	O
that	O
wheel	O
to	O
cull	O
the	O
remaining	O
composite	O
numbers	O
from	O
that	O
last	O
wheel	O
list	O
using	O
a	O
Sieve	B-Algorithm
of	I-Algorithm
Eratosthenes	I-Algorithm
type	O
technique	O
but	O
using	O
the	O
gap	O
pattern	O
inherent	O
to	O
the	O
wheel	O
to	O
avoid	O
redundant	O
culls	O
;	O
some	O
optimizations	O
may	O
be	O
able	O
to	O
be	O
made	O
based	O
on	O
the	O
fact	O
that	O
(	O
will	O
be	O
proven	O
in	O
the	O
next	O
section	O
)	O
that	O
there	O
will	O
be	O
no	O
repeat	O
culling	O
of	O
any	O
composite	O
number	O
:	O
each	O
remaining	O
composite	O
will	O
be	O
culled	O
exactly	O
once	O
.	O
</s>
