<s>
The	O
number	O
of	O
different	O
maximal	O
independent	O
sets	O
in	O
an	O
-vertex	O
cycle	O
graph	O
is	O
counted	O
by	O
the	O
th	O
Perrin	B-Algorithm
number	I-Algorithm
for	O
.	O
</s>
<s>
This	O
formula	O
can	O
be	O
used	O
to	O
quickly	O
calculate	O
values	O
of	O
the	O
Perrin	B-Algorithm
sequence	I-Algorithm
for	O
large	O
n	O
.	O
The	O
ratio	O
of	O
successive	O
terms	O
in	O
the	O
Perrin	B-Algorithm
sequence	I-Algorithm
approaches	O
p	O
,	O
a.k.a.	O
</s>
<s>
This	O
constant	O
bears	O
the	O
same	O
relationship	O
to	O
the	O
Perrin	B-Algorithm
sequence	I-Algorithm
as	O
the	O
golden	O
ratio	O
does	O
to	O
the	O
Lucas	B-Algorithm
sequence	I-Algorithm
.	O
</s>
<s>
Similar	O
connections	O
exist	O
also	O
between	O
p	O
and	O
the	O
Padovan	B-Algorithm
sequence	I-Algorithm
,	O
between	O
the	O
golden	O
ratio	O
and	O
Fibonacci	O
numbers	O
,	O
and	O
between	O
the	O
silver	O
ratio	O
and	O
Pell	O
numbers	O
.	O
</s>
<s>
which	O
gives	O
us	O
three	O
linear	O
equations	O
with	O
coefficients	O
over	O
the	O
splitting	O
field	O
of	O
;	O
by	O
inverting	O
a	O
matrix	B-Architecture
we	O
can	O
solve	O
for	O
and	O
then	O
we	O
can	O
raise	O
them	O
to	O
the	O
kth	O
power	O
and	O
compute	O
the	O
sum	O
.	O
</s>
<s>
Example	O
magma	B-General_Concept
code	O
:	O
</s>
<s>
Mi	O
:	O
=	O
Matrix( 	O
1/p	O
,	O
1/q	O
,	O
1/r	O
,	O
1	O
,	O
1	O
,	O
1	O
,	O
p	O
,	O
q	O
,	O
r	O
)	O
^( 	O
-1	O
)	O
;	O
</s>
<s>
v1	O
:=	O
ChangeRing(Mi,T )	O
*	O
Matrix(u,v,w )	O
;	O
</s>
<s>
This	O
allows	O
computation	O
of	O
the	O
nth	O
Perrin	B-Algorithm
number	I-Algorithm
using	O
integer	O
arithmetic	O
in	O
multiplies	O
.	O
</s>
<s>
If	O
n	O
has	O
this	O
property	O
,	O
it	O
is	O
called	O
a	O
"	O
Perrin	O
pseudoprime	B-Algorithm
"	O
.	O
</s>
<s>
The	O
question	O
of	O
the	O
existence	O
of	O
Perrin	O
pseudoprimes	B-Algorithm
was	O
considered	O
by	O
Perrin	O
himself	O
,	O
but	O
it	O
was	O
not	O
known	O
whether	O
they	O
existed	O
until	O
Adams	O
and	O
Shanks	O
(	O
1982	O
)	O
discovered	O
the	O
smallest	O
one	O
,	O
271441	O
=	O
5212	O
;	O
the	O
next-smallest	O
is	O
904631	O
=	O
7	O
×	O
13	O
×	O
9941	O
.	O
</s>
<s>
There	O
are	O
seventeen	O
of	O
them	O
less	O
than	O
a	O
billion	O
;	O
Jon	O
Grantham	O
has	O
proved	O
that	O
there	O
are	O
infinitely	O
many	O
Perrin	O
pseudoprimes	B-Algorithm
.	O
</s>
<s>
Adams	O
and	O
Shanks	O
(	O
1982	O
)	O
noted	O
that	O
primes	O
also	O
meet	O
the	O
condition	O
that	O
P( −p	O
)	O
=	O
−1	O
mod	O
p	O
.	O
Composites	O
where	O
both	O
properties	O
hold	O
are	O
called	O
"	O
restricted	O
Perrin	O
pseudoprimes	B-Algorithm
"	O
.	O
</s>
<s>
While	O
Perrin	O
pseudoprimes	B-Algorithm
are	O
rare	O
,	O
they	O
have	O
significant	O
overlap	O
with	O
Fermat	B-Algorithm
pseudoprimes	I-Algorithm
.	O
</s>
<s>
This	O
contrasts	O
with	O
the	O
Lucas	B-Algorithm
pseudoprimes	I-Algorithm
which	O
are	O
anti-correlated	O
.	O
</s>
<s>
The	O
latter	O
condition	O
is	O
exploited	O
to	O
yield	O
the	O
popular	O
,	O
efficient	O
,	O
and	O
more	O
effective	O
BPSW	B-Algorithm
test	I-Algorithm
which	O
has	O
no	O
known	O
pseudoprimes	B-Algorithm
,	O
and	O
the	O
smallest	O
is	O
known	O
to	O
be	O
greater	O
than	O
264	O
.	O
</s>
<s>
A	O
Perrin	O
prime	O
is	O
a	O
Perrin	B-Algorithm
number	I-Algorithm
that	O
is	O
prime	O
.	O
</s>
