<s>
In	O
number	O
theory	O
,	O
a	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
is	O
a	O
pseudoprime	B-Algorithm
,	O
whose	O
definition	O
was	O
inspired	O
by	O
the	O
quadratic	B-Algorithm
Frobenius	I-Algorithm
test	I-Algorithm
described	O
by	O
Jon	O
Grantham	O
in	O
a	O
1998	O
preprint	O
and	O
published	O
in	O
2000	O
.	O
</s>
<s>
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
can	O
be	O
defined	O
with	O
respect	O
to	O
polynomials	O
of	O
degree	O
at	O
least	O
2	O
,	O
but	O
they	O
have	O
been	O
most	O
extensively	O
studied	O
in	O
the	O
case	O
of	O
quadratic	O
polynomials	O
.	O
</s>
<s>
Definition	O
of	O
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
with	O
respect	O
to	O
a	O
monic	O
quadratic	O
polynomial	O
,	O
where	O
the	O
discriminant	O
is	O
not	O
a	O
square	O
,	O
can	O
be	O
expressed	O
in	O
terms	O
of	O
Lucas	B-Algorithm
sequences	I-Algorithm
and	O
as	O
follows	O
.	O
</s>
<s>
Therefore	O
,	O
Frobenius	O
pseudoprime	B-Algorithm
can	O
be	O
equivalently	O
defined	O
by	O
conditions	O
(	O
1-2	O
)	O
and	O
(	O
3	O
)	O
,	O
or	O
by	O
conditions	O
(	O
1-2	O
)	O
and	O
(	O
3′	O
)	O
.	O
</s>
<s>
Since	O
conditions	O
(	O
2	O
)	O
and	O
(	O
3	O
)	O
hold	O
for	O
all	O
primes	O
which	O
satisfy	O
the	O
simple	O
condition	O
(	O
1	O
)	O
,	O
they	O
can	O
be	O
used	O
as	O
a	O
probable	B-Algorithm
prime	I-Algorithm
test	O
.	O
</s>
<s>
a	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
with	O
parameters	O
,	O
since	O
it	O
is	O
defined	O
by	O
conditions	O
(	O
1	O
)	O
and	O
(	O
2	O
)	O
;	O
</s>
<s>
a	O
Dickson	O
pseudoprime	B-Algorithm
with	O
parameters	O
,	O
since	O
it	O
is	O
defined	O
by	O
conditions	O
(	O
1	O
)	O
and	O
(	O
3	O
 '	O
)	O
;	O
</s>
<s>
a	O
Fermat	B-Algorithm
pseudoprime	I-Algorithm
base	O
when	O
.	O
</s>
<s>
Converse	O
of	O
none	O
of	O
these	O
statements	O
is	O
true	O
,	O
making	O
the	O
Frobenius	O
pseudoprimes	B-Algorithm
a	O
proper	O
subset	O
of	O
each	O
of	O
the	O
sets	O
of	O
Lucas	B-Algorithm
pseudoprimes	I-Algorithm
and	O
Dickson	O
pseudoprimes	B-Algorithm
with	O
parameters	O
,	O
and	O
Fermat	B-Algorithm
pseudoprimes	I-Algorithm
base	O
when	O
.	O
</s>
<s>
Furthermore	O
,	O
it	O
follows	O
that	O
for	O
the	O
same	O
parameters	O
,	O
a	O
composite	O
number	O
is	O
a	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
if	O
and	O
only	O
if	O
it	O
is	O
both	O
Lucas	O
and	O
Dickson	O
pseudoprime	B-Algorithm
.	O
</s>
<s>
In	O
other	O
words	O
,	O
for	O
every	O
fixed	O
pair	O
of	O
parameters	O
,	O
the	O
set	O
of	O
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
equals	O
the	O
intersection	O
of	O
the	O
sets	O
of	O
Lucas	O
and	O
Dickson	O
pseudoprimes	B-Algorithm
.	O
</s>
<s>
While	O
each	O
Frobenius	O
pseudoprime	B-Algorithm
is	O
a	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
,	O
it	O
is	O
not	O
necessarily	O
a	O
strong	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
6721	O
is	O
the	O
first	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
for	O
,	O
which	O
is	O
not	O
a	O
strong	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
.	O
</s>
<s>
Every	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
to	O
is	O
also	O
a	O
restricted	O
Perrin	O
pseudoprime	B-Algorithm
.	O
</s>
<s>
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
with	O
respect	O
to	O
the	O
Fibonacci	O
polynomial	O
are	O
determined	O
in	O
terms	O
of	O
the	O
Fibonacci	B-Algorithm
numbers	I-Algorithm
and	O
Lucas	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
Such	O
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
form	O
the	O
sequence	O
:	O
</s>
<s>
While	O
323	O
is	O
the	O
first	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
with	O
respect	O
to	O
the	O
Fibonacci	O
polynomial	O
,	O
the	O
first	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
with	O
respect	O
to	O
the	O
same	O
polynomial	O
is	O
4181	O
(	O
Grantham	O
stated	O
it	O
as	O
5777	O
but	O
multiple	O
authors	O
have	O
noted	O
this	O
is	O
incorrect	O
and	O
is	O
instead	O
the	O
first	O
pseudoprime	B-Algorithm
with	O
for	O
this	O
polynomial	O
)	O
.	O
</s>
<s>
Another	O
case	O
,	O
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
with	O
respect	O
to	O
the	O
quadratic	O
polynomial	O
can	O
be	O
determined	O
using	O
the	O
Lucas	O
sequence	O
and	O
are	O
:	O
</s>
<s>
In	O
this	O
case	O
,	O
the	O
first	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
with	O
respect	O
to	O
the	O
quadratic	O
polynomial	O
is	O
119	O
,	O
which	O
is	O
also	O
the	O
first	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
with	O
respect	O
to	O
the	O
same	O
polynomial	O
.	O
</s>
<s>
,	O
has	O
sparser	O
pseudoprimes	B-Algorithm
as	O
compared	O
to	O
many	O
other	O
simple	O
quadratics	O
.	O
</s>
<s>
Notice	O
there	O
are	O
only	O
3	O
such	O
pseudoprimes	B-Algorithm
below	O
500000	O
,	O
while	O
there	O
are	O
many	O
Frobenius	O
(	O
1	O
,	O
−1	O
)	O
and	O
(	O
3	O
,	O
−1	O
)	O
pseudoprimes	B-Algorithm
below	O
500000	O
.	O
</s>
<s>
Every	O
entry	O
in	O
this	O
sequence	O
is	O
a	O
Fermat	B-Algorithm
pseudoprime	I-Algorithm
to	O
base	O
5	O
as	O
well	O
as	O
a	O
Lucas	O
(	O
3	O
,	O
−5	O
)	O
pseudoprime	B-Algorithm
,	O
but	O
the	O
converse	O
is	O
not	O
true	O
:	O
642001	O
is	O
both	O
a	O
psp-5	O
and	O
a	O
Lucas	O
(	O
3	O
,	O
-5	O
)	O
pseudoprime	B-Algorithm
,	O
but	O
is	O
not	O
a	O
Frobenius	O
(	O
3	O
,	O
−5	O
)	O
pseudoprime	B-Algorithm
.	O
</s>
<s>
(	O
note	O
that	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
for	O
a	O
pair	O
need	O
not	O
to	O
be	O
a	O
Fermat	B-Algorithm
pseudoprime	I-Algorithm
for	O
base	O
||	O
,	O
e.g.	O
</s>
<s>
14209	O
is	O
a	O
Lucas	O
(	O
1	O
,	O
−3	O
)	O
pseudoprime	B-Algorithm
,	O
but	O
not	O
a	O
Fermat	B-Algorithm
pseudoprime	I-Algorithm
for	O
base	O
3	O
.	O
</s>
<s>
Strong	B-Algorithm
Frobenius	I-Algorithm
pseudoprimes	I-Algorithm
are	O
also	O
defined	O
.	O
</s>
<s>
The	O
conditions	O
defining	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
can	O
be	O
used	O
for	O
testing	O
a	O
given	O
number	O
n	O
for	O
probable	B-Algorithm
primality	I-Algorithm
.	O
</s>
<s>
Sometimes	O
such	O
composite	O
numbers	O
are	O
commonly	O
called	O
Frobenius	B-Algorithm
pseudoprimes	I-Algorithm
,	O
although	O
they	O
may	O
correspond	O
to	O
different	O
parameters	O
.	O
</s>
<s>
as	O
part	O
of	O
the	O
Baillie	B-Algorithm
–	I-Algorithm
PSW	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
and	O
used	O
by	O
Grantham	O
in	O
his	O
quadratic	B-Algorithm
Frobenius	I-Algorithm
test	I-Algorithm
,	O
</s>
<s>
In	O
particular	O
,	O
it	O
was	O
shown	O
that	O
choosing	O
parameters	O
from	O
quadratic	O
non-residues	O
modulo	O
n	O
(	O
based	O
on	O
the	O
Jacobi	O
symbol	O
)	O
makes	O
far	O
stronger	O
tests	O
,	O
and	O
is	O
one	O
reason	O
for	O
the	O
success	O
of	O
the	O
Baillie	B-Algorithm
–	I-Algorithm
PSW	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
For	O
instance	O
,	O
for	O
the	O
parameters	O
(	O
P	O
,	O
2	O
)	O
,	O
where	O
P	O
is	O
the	O
first	O
odd	O
integer	O
that	O
satisfies	O
,	O
there	O
are	O
no	O
pseudoprimes	B-Algorithm
below	O
.	O
</s>
<s>
While	O
all	O
prime	O
n	O
pass	O
this	O
test	O
,	O
a	O
composite	O
n	O
passes	O
it	O
if	O
and	O
only	O
if	O
n	O
is	O
a	O
Frobenius	B-Algorithm
pseudoprime	I-Algorithm
for	O
.	O
</s>
<s>
Similar	O
to	O
the	O
above	O
example	O
,	O
Khashin	O
notes	O
that	O
no	O
pseudoprime	B-Algorithm
has	O
been	O
found	O
for	O
his	O
test	O
.	O
</s>
<s>
The	O
computational	O
cost	O
of	O
the	O
Frobenius	O
pseudoprimality	B-Algorithm
test	O
with	O
respect	O
to	O
quadratic	O
polynomials	O
is	O
roughly	O
three	O
times	O
the	O
cost	O
of	O
a	O
strong	B-Algorithm
pseudoprimality	I-Algorithm
test	O
(	O
e.g.	O
</s>
<s>
a	O
single	O
round	O
of	O
the	O
Miller	B-Algorithm
–	I-Algorithm
Rabin	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
)	O
,	O
1.5	O
times	O
that	O
of	O
a	O
Lucas	B-Algorithm
pseudoprimality	I-Algorithm
test	O
,	O
and	O
slightly	O
more	O
than	O
a	O
Baillie	B-Algorithm
–	I-Algorithm
PSW	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
<s>
Note	O
that	O
the	O
quadratic	B-Algorithm
Frobenius	I-Algorithm
test	I-Algorithm
is	O
stronger	O
than	O
the	O
Lucas	O
test	O
.	O
</s>
<s>
For	O
example	O
,	O
1763	O
is	O
a	O
Lucas	B-Algorithm
pseudoprime	I-Algorithm
to	O
(	O
P	O
,	O
Q	O
)	O
=	O
(	O
3	O
,	O
-1	O
)	O
since	O
U1764(3,-1 )	O
≡	O
0	O
(	O
mod	O
1763	O
)	O
(U(3 , -1 )	O
is	O
given	O
in	O
)	O
,	O
and	O
it	O
also	O
passes	O
the	O
Jacobi	O
step	O
since	O
,	O
but	O
it	O
fails	O
the	O
Frobenius	O
test	O
to	O
x2	O
-	O
3x	O
-	O
1	O
.	O
</s>
<s>
While	O
the	O
quadratic	B-Algorithm
Frobenius	I-Algorithm
test	I-Algorithm
does	O
not	O
have	O
formal	O
error	O
bounds	O
beyond	O
that	O
of	O
the	O
Lucas	O
test	O
,	O
it	O
can	O
be	O
used	O
as	O
the	O
basis	O
for	O
methods	O
with	O
much	O
smaller	O
error	O
bounds	O
.	O
</s>
<s>
Based	O
on	O
this	O
idea	O
of	O
pseudoprimes	B-Algorithm
,	O
algorithms	O
with	O
strong	O
worst-case	O
error	O
bounds	O
can	O
be	O
built	O
.	O
</s>
<s>
The	O
quadratic	B-Algorithm
Frobenius	I-Algorithm
test	I-Algorithm
,	O
using	O
a	O
quadratic	B-Algorithm
Frobenius	I-Algorithm
test	I-Algorithm
plus	O
other	O
conditions	O
,	O
has	O
a	O
bound	O
of	O
.	O
</s>
<s>
Given	O
the	O
same	O
computational	O
effort	O
,	O
these	O
offer	O
better	O
worst-case	O
bounds	O
than	O
the	O
commonly	O
used	O
Miller	B-Algorithm
–	I-Algorithm
Rabin	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
.	O
</s>
