<s>
Berggrens	O
's	O
tree	B-Data_Structure
of	I-Data_Structure
primitive	I-Data_Structure
Pythagorean	I-Data_Structure
triples	I-Data_Structure
.	O
</s>
<s>
In	O
mathematics	O
,	O
a	O
tree	B-Data_Structure
of	I-Data_Structure
primitive	I-Data_Structure
Pythagorean	I-Data_Structure
triples	I-Data_Structure
is	O
a	O
data	B-Application
tree	I-Application
in	O
which	O
each	O
node	O
branches	O
to	O
three	O
subsequent	O
nodes	O
with	O
the	O
infinite	O
set	O
of	O
all	O
nodes	O
giving	O
all	O
(	O
and	O
only	O
)	O
primitive	O
Pythagorean	O
triples	O
without	O
duplication	O
.	O
</s>
<s>
The	O
set	O
of	O
all	O
primitive	O
Pythagorean	O
triples	O
has	O
the	O
structure	O
of	O
a	O
rooted	O
tree	B-Data_Structure
,	O
specifically	O
a	O
ternary	B-Data_Structure
tree	I-Data_Structure
,	O
in	O
a	O
natural	O
way	O
.	O
</s>
<s>
The	O
result	O
may	O
be	O
graphically	O
represented	O
as	O
an	O
infinite	O
ternary	B-Data_Structure
tree	I-Data_Structure
with	O
(	O
3	O
,	O
4	O
,	O
5	O
)	O
at	O
the	O
root	B-Application
node	I-Application
(	O
see	O
classic	O
tree	B-Data_Structure
at	O
right	O
)	O
.	O
</s>
<s>
This	O
tree	B-Data_Structure
also	O
appeared	O
in	O
papers	O
of	O
A.Hall	O
in	O
1970	O
and	O
A	O
.	O
R	O
.	O
Kanga	O
in	O
1990	O
.	O
</s>
<s>
In	O
2008	O
V	O
.	O
E	O
.	O
Firstov	O
showed	O
generally	O
that	O
only	O
three	O
such	O
trichotomy	O
trees	O
exist	O
and	O
give	O
explicitly	O
a	O
tree	B-Data_Structure
similar	O
to	O
Berggren	O
's	O
but	O
starting	O
with	O
initial	O
node	O
(	O
4	O
,	O
3	O
,	O
5	O
)	O
.	O
</s>
<s>
It	O
can	O
be	O
shown	O
inductively	B-Algorithm
that	O
the	O
tree	B-Data_Structure
contains	O
primitive	O
Pythagorean	O
triples	O
and	O
nothing	O
else	O
by	O
showing	O
that	O
starting	O
from	O
a	O
primitive	O
Pythagorean	O
triple	O
,	O
such	O
as	O
is	O
present	O
at	O
the	O
initial	O
node	O
with	O
(	O
3	O
,	O
4	O
,	O
5	O
)	O
,	O
each	O
generated	O
triple	O
is	O
both	O
Pythagorean	O
and	O
primitive	O
.	O
</s>
<s>
If	O
any	O
of	O
the	O
above	O
matrices	B-Architecture
,	O
say	O
A	O
,	O
is	O
applied	O
to	O
a	O
triple	O
(	O
a	O
,	O
b	O
,	O
c	O
)	O
T	O
having	O
the	O
Pythagorean	O
property	O
a2+b2	O
=	O
c2	O
to	O
obtain	O
a	O
new	O
triple	O
(	O
d	O
,	O
e	O
,	O
f	O
)	O
T	O
=	O
A(a,b,c )	O
T	O
,	O
this	O
new	O
triple	O
is	O
also	O
Pythagorean	O
.	O
</s>
<s>
The	O
matrices	B-Architecture
A	O
,	O
B	O
,	O
and	O
C	O
are	O
all	O
unimodular	B-Algorithm
—	O
that	O
is	O
,	O
they	O
have	O
only	O
integer	O
entries	O
and	O
their	O
determinants	O
are	O
±1	O
.	O
</s>
<s>
Thus	O
their	O
inverses	O
are	O
also	O
unimodular	B-Algorithm
and	O
in	O
particular	O
have	O
only	O
integer	O
entries	O
.	O
</s>
<s>
To	O
show	O
that	O
the	O
tree	B-Data_Structure
contains	O
every	O
primitive	O
Pythagorean	O
triple	O
,	O
but	O
no	O
more	O
than	O
once	O
,	O
it	O
suffices	O
to	O
show	O
that	O
for	O
any	O
such	O
triple	O
there	O
is	O
exactly	O
one	O
path	O
back	O
through	O
the	O
tree	B-Data_Structure
to	O
the	O
starting	O
node	O
(	O
3	O
,	O
4	O
,	O
5	O
)	O
.	O
</s>
<s>
This	O
can	O
be	O
seen	O
by	O
applying	O
in	O
turn	O
each	O
of	O
the	O
unimodular	B-Algorithm
inverse	O
matrices	B-Architecture
A−1	O
,	O
B−1	O
,	O
and	O
C−1	O
to	O
an	O
arbitrary	O
primitive	O
Pythagorean	O
triple	O
(	O
d	O
,	O
e	O
,	O
f	O
)	O
,	O
noting	O
that	O
by	O
the	O
above	O
reasoning	O
primitivity	O
and	O
the	O
Pythagorean	O
property	O
are	O
retained	O
,	O
and	O
noting	O
that	O
for	O
any	O
triple	O
larger	O
than	O
(	O
3	O
,	O
4	O
,	O
5	O
)	O
exactly	O
one	O
of	O
the	O
inverse	O
transition	O
matrices	B-Architecture
yields	O
a	O
new	O
triple	O
with	O
all	O
positive	O
entries	O
(	O
and	O
a	O
smaller	O
hypotenuse	O
)	O
.	O
</s>
<s>
By	B-Algorithm
induction	I-Algorithm
,	O
this	O
new	O
valid	O
triple	O
itself	O
leads	O
to	O
exactly	O
one	O
smaller	O
valid	O
triple	O
,	O
and	O
so	O
forth	O
.	O
</s>
<s>
This	O
proves	O
that	O
(	O
d	O
,	O
e	O
,	O
f	O
)	O
does	O
in	O
fact	O
occur	O
in	O
the	O
tree	B-Data_Structure
,	O
since	O
it	O
can	O
be	O
reached	O
from	O
(	O
3	O
,	O
4	O
,	O
5	O
)	O
by	O
reversing	O
the	O
steps	O
;	O
and	O
it	O
occurs	O
uniquely	O
because	O
there	O
was	O
only	O
one	O
path	O
from	O
(	O
d	O
,	O
e	O
,	O
f	O
)	O
to	O
(	O
3	O
,	O
4	O
,	O
5	O
)	O
.	O
</s>
<s>
A	O
geometric	O
interpretation	O
for	O
this	O
tree	B-Data_Structure
involves	O
the	O
excircles	O
present	O
at	O
each	O
node	O
.	O
</s>
<s>
Moreover	O
,	O
an	O
infinitude	O
of	O
other	O
third-order	O
univariate	O
difference	O
equations	O
can	O
be	O
found	O
by	O
multiplying	O
any	O
of	O
the	O
three	O
matrices	B-Architecture
together	O
an	O
arbitrary	O
number	O
of	O
times	O
in	O
an	O
arbitrary	O
sequence	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
matrix	O
D=	O
CB	O
moves	O
one	O
out	O
the	O
tree	B-Data_Structure
by	O
two	O
nodes	O
(	O
across	O
,	O
then	O
down	O
)	O
in	O
a	O
single	O
step	O
;	O
the	O
characteristic	O
equation	O
of	O
D	O
provides	O
the	O
pattern	O
for	O
the	O
third-order	O
dynamics	O
of	O
any	O
of	O
a	O
,	O
b	O
,	O
or	O
c	O
in	O
the	O
non-exhaustive	O
tree	B-Data_Structure
formed	O
byD	O
.	O
</s>
<s>
Price	O
's	O
tree	B-Data_Structure
of	I-Data_Structure
primitive	I-Data_Structure
Pythagorean	I-Data_Structure
triples	I-Data_Structure
.	O
</s>
<s>
Another	O
approach	O
to	O
the	O
dynamics	O
of	O
this	O
tree	B-Data_Structure
relies	O
on	O
the	O
standard	O
formula	O
for	O
generating	O
all	O
primitive	O
Pythagorean	O
triples	O
:	O
</s>
<s>
The	O
resulting	O
ternary	B-Data_Structure
tree	I-Data_Structure
,	O
starting	O
at	O
(	O
2	O
,	O
1	O
)	O
,	O
contains	O
every	O
such	O
(	O
m	O
,	O
n	O
)	O
pair	O
exactly	O
once	O
,	O
and	O
when	O
converted	O
into	O
(	O
a	O
,	O
b	O
,	O
c	O
)	O
triples	O
it	O
becomes	O
identical	O
to	O
the	O
tree	B-Data_Structure
described	O
above	O
.	O
</s>
<s>
Another	O
way	O
of	O
using	O
two	O
underlying	O
parameters	O
to	O
generate	O
the	O
tree	B-Data_Structure
of	O
triples	O
uses	O
an	O
alternative	O
formula	O
for	O
all	O
primitive	O
triples	O
:	O
</s>
<s>
Pairs	O
(	O
u	O
,	O
v	O
)	O
can	O
be	O
iterated	O
by	O
pre-multiplying	O
them	O
(	O
expressed	O
as	O
a	O
column	O
vector	O
)	O
by	O
any	O
of	O
the	O
above	O
2×2	O
matrices	B-Architecture
,	O
all	O
three	O
of	O
which	O
preserve	O
the	O
inequalities	O
,	O
coprimeness	O
,	O
and	O
the	O
odd	O
parity	O
of	O
both	O
elements	O
.	O
</s>
<s>
When	O
this	O
process	O
is	O
begun	O
at	O
(	O
3	O
,	O
1	O
)	O
,	O
the	O
resulting	O
ternary	B-Data_Structure
tree	I-Data_Structure
contains	O
every	O
such	O
(	O
u	O
,	O
v	O
)	O
pair	O
exactly	O
once	O
,	O
and	O
when	O
converted	O
into	O
(	O
a	O
,	O
b	O
,	O
c	O
)	O
triples	O
it	O
becomes	O
identical	O
to	O
the	O
tree	B-Data_Structure
described	O
above	O
.	O
</s>
<s>
Alternatively	O
,	O
one	O
may	O
also	O
use	O
3	O
different	O
matrices	B-Architecture
found	O
by	O
Price	O
.	O
</s>
<s>
These	O
matrices	B-Architecture
A	O
 '	O
,	O
B	O
 '	O
,	O
C	O
 '	O
and	O
their	O
corresponding	O
linear	O
transformations	O
are	O
shown	O
below	O
.	O
</s>
<s>
The	O
3	O
children	O
produced	O
by	O
each	O
of	O
the	O
two	O
sets	O
of	O
matrices	B-Architecture
are	O
not	O
the	O
same	O
,	O
but	O
each	O
set	O
separately	O
produces	O
all	O
primitive	O
triples	O
.	O
</s>
