<s>
A	O
strong	B-Algorithm
pseudoprime	I-Algorithm
is	O
a	O
composite	O
number	O
that	O
passes	O
the	O
Miller	B-Algorithm
–	I-Algorithm
Rabin	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
All	O
prime	O
numbers	O
pass	O
this	O
test	O
,	O
but	O
a	O
small	O
fraction	O
of	O
composites	O
also	O
pass	O
,	O
making	O
them	O
"	O
pseudoprimes	B-Algorithm
"	O
.	O
</s>
<s>
Unlike	O
the	O
Fermat	B-Algorithm
pseudoprimes	I-Algorithm
,	O
for	O
which	O
there	O
exist	O
numbers	O
that	O
are	O
pseudoprimes	B-Algorithm
to	O
all	O
coprime	O
bases	O
(	O
the	O
Carmichael	O
numbers	O
)	O
,	O
there	O
are	O
no	O
composites	O
that	O
are	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
to	O
all	O
bases	O
.	O
</s>
<s>
Let	O
us	O
say	O
we	O
want	O
to	O
investigate	O
if	O
n	O
=	O
31697	O
is	O
a	O
probable	B-Algorithm
prime	I-Algorithm
(	O
PRP	O
)	O
.	O
</s>
<s>
This	O
shows	O
that	O
31697	O
is	O
not	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
base	O
3	O
.	O
</s>
<s>
In	O
this	O
situation	O
,	O
we	O
say	O
that	O
47197	O
is	O
a	O
strong	O
probable	B-Algorithm
prime	I-Algorithm
to	O
base	O
3	O
.	O
</s>
<s>
Because	O
it	O
turns	O
out	O
this	O
PRP	O
is	O
in	O
fact	O
composite	O
(	O
can	O
be	O
seen	O
by	O
picking	O
other	O
bases	O
than	O
3	O
)	O
,	O
we	O
have	O
that	O
47197	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
base	O
3	O
.	O
</s>
<s>
When	O
this	O
occurs	O
,	O
we	O
stop	O
the	O
calculation	O
(	O
even	O
though	O
the	O
exponent	O
is	O
not	O
odd	O
yet	O
)	O
and	O
say	O
that	O
74593	O
is	O
a	O
strong	O
probable	B-Algorithm
prime	I-Algorithm
(	O
and	O
,	O
as	O
it	O
turns	O
out	O
,	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
)	O
to	O
base	O
3	O
.	O
</s>
<s>
An	O
odd	O
composite	O
number	O
n	O
=	O
d	O
·	O
2s	O
+	O
1	O
where	O
d	O
is	O
odd	O
is	O
called	O
a	O
strong	O
(	O
Fermat	O
)	O
pseudoprime	B-Algorithm
to	O
base	O
a	O
if	O
:	O
</s>
<s>
(	O
If	O
a	O
number	O
n	O
satisfies	O
one	O
of	O
the	O
above	O
conditions	O
and	O
we	O
do	O
n't	O
yet	O
know	O
whether	O
it	O
is	O
prime	O
,	O
it	O
is	O
more	O
precise	O
to	O
refer	O
to	O
it	O
as	O
a	O
strong	O
probable	B-Algorithm
prime	I-Algorithm
to	O
base	O
a	O
.	O
</s>
<s>
But	O
if	O
we	O
know	O
that	O
n	O
is	O
not	O
prime	O
,	O
then	O
we	O
may	O
use	O
the	O
term	O
strong	B-Algorithm
pseudoprime	I-Algorithm
.	O
)	O
</s>
<s>
A	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
base	O
a	O
is	O
always	O
an	O
Euler	B-Algorithm
–	I-Algorithm
Jacobi	I-Algorithm
pseudoprime	I-Algorithm
,	O
an	O
Euler	B-Algorithm
pseudoprime	I-Algorithm
and	O
a	O
Fermat	B-Algorithm
pseudoprime	I-Algorithm
to	O
that	O
base	O
,	O
but	O
not	O
all	O
Euler	O
and	O
Fermat	B-Algorithm
pseudoprimes	I-Algorithm
are	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
.	O
</s>
<s>
Carmichael	O
numbers	O
may	O
be	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
to	O
some	O
bases	O
—	O
for	O
example	O
,	O
561	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
base	O
50	O
—	O
but	O
not	O
to	O
all	O
bases	O
.	O
</s>
<s>
A	O
composite	O
number	O
n	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
at	O
most	O
one	O
quarter	O
of	O
all	O
bases	O
below	O
n	O
;	O
thus	O
,	O
there	O
are	O
no	O
"	O
strong	O
Carmichael	O
numbers	O
"	O
,	O
numbers	O
that	O
are	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
to	O
all	O
bases	O
.	O
</s>
<s>
Thus	O
given	O
a	O
random	O
base	O
,	O
the	O
probability	O
that	O
a	O
number	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
that	O
base	O
is	O
less	O
than	O
1/4	O
,	O
forming	O
the	O
basis	O
of	O
the	O
widely	O
used	O
Miller	B-Algorithm
–	I-Algorithm
Rabin	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
Paul	O
Erdos	O
and	O
Carl	O
Pomerance	O
showed	O
in	O
1986	O
that	O
if	O
a	O
random	O
integer	O
n	O
passes	O
the	O
Miller	B-Algorithm
–	I-Algorithm
Rabin	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
to	O
a	O
random	O
base	O
b	O
,	O
then	O
n	O
is	O
almost	O
surely	O
a	O
prime	O
.	O
</s>
<s>
For	O
example	O
,	O
of	O
the	O
first	O
25,000,000,000	O
positive	O
integers	O
,	O
there	O
are	O
1,091,987,405	O
integers	O
that	O
are	O
probable	B-Algorithm
primes	I-Algorithm
to	O
base	O
2	O
,	O
but	O
only	O
21,853	O
of	O
them	O
are	O
pseudoprimes	B-Algorithm
,	O
and	O
even	O
fewer	O
of	O
them	O
are	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
,	O
as	O
the	O
latter	O
is	O
a	O
subset	O
of	O
the	O
former	O
.	O
</s>
<s>
gives	O
a	O
397-digit	O
Carmichael	O
number	O
that	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
every	O
base	O
less	O
than	O
307	O
.	O
</s>
<s>
One	O
way	O
to	O
reduce	O
the	O
chance	O
that	O
such	O
a	O
number	O
is	O
wrongfully	O
declared	O
probably	O
prime	O
is	O
to	O
combine	O
a	O
strong	O
probable	B-Algorithm
prime	I-Algorithm
test	O
with	O
a	O
Lucas	B-Algorithm
probable	I-Algorithm
prime	I-Algorithm
test	O
,	O
as	O
in	O
the	O
Baillie	B-Algorithm
–	I-Algorithm
PSW	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
There	O
are	O
infinitely	O
many	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
to	O
any	O
base	O
.	O
</s>
<s>
For	O
example	O
,	O
there	O
are	O
only	O
13	O
numbers	O
less	O
than	O
25·109	O
that	O
are	O
strong	B-Algorithm
pseudoprimes	I-Algorithm
to	O
bases	O
2	O
,	O
3	O
,	O
and	O
5	O
simultaneously	O
.	O
</s>
<s>
This	O
means	O
that	O
,	O
if	O
n	O
is	O
less	O
than	O
25326001	O
and	O
n	O
is	O
a	O
strong	O
probable	B-Algorithm
prime	I-Algorithm
to	O
bases	O
2	O
,	O
3	O
,	O
and	O
5	O
,	O
then	O
n	O
is	O
prime	O
.	O
</s>
<s>
Carrying	O
this	O
further	O
,	O
3825123056546413051	O
is	O
the	O
smallest	O
number	O
that	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
the	O
9	O
bases	O
2	O
,	O
3	O
,	O
5	O
,	O
7	O
,	O
11	O
,	O
13	O
,	O
17	O
,	O
19	O
,	O
and	O
23	O
.	O
</s>
<s>
So	O
,	O
if	O
n	O
is	O
less	O
than	O
3825123056546413051	O
and	O
n	O
is	O
a	O
strong	O
probable	B-Algorithm
prime	I-Algorithm
to	O
these	O
9	O
bases	O
,	O
then	O
n	O
is	O
prime	O
.	O
</s>
<s>
For	O
example	O
,	O
there	O
is	O
no	O
composite	O
that	O
is	O
a	O
strong	B-Algorithm
pseudoprime	I-Algorithm
to	O
all	O
of	O
the	O
seven	O
bases	O
2	O
,	O
325	O
,	O
9375	O
,	O
28178	O
,	O
450775	O
,	O
9780504	O
,	O
and	O
1795265022	O
.	O
</s>
