# A brief note on Pythagorean Triples

And I decided today to share what I learned about an algorithm for generating Pythagorean triples for any

*** QuickLaTeX cannot compile formula:
m

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



and

*** QuickLaTeX cannot compile formula:
n

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



, where

*** QuickLaTeX cannot compile formula:
m, n \in

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



Z. A Pythagorean triple are any three whole numbers which satisfy the equation

*** QuickLaTeX cannot compile formula:
a^2 + b^2 = c^2

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



. Let

*** QuickLaTeX cannot compile formula:
a = m^2 - n^2

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



;

*** QuickLaTeX cannot compile formula:
b = 2 m n

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



, and you will obtain a solution to the relation

*** QuickLaTeX cannot compile formula:
a^2 + b^2 = c^2

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



. It is therefore not that hard, if we allow

*** QuickLaTeX cannot compile formula:
m

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



and

*** QuickLaTeX cannot compile formula:
n

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



to be any numbers from 1 to 100, and

*** QuickLaTeX cannot compile formula:
m \ne n

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



, to write a computer program to generate the first 9800 or so Pythagorean triples, allowing for negative values for

*** QuickLaTeX cannot compile formula:
a

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



or

*** QuickLaTeX cannot compile formula:
b

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}



.