0
$\begingroup$

If I input the code

FindInstance[x^2 + y^2 == z^2 && 0 < x && 0 < y && 0 < z, {x, y, z}, Integers, 2]

Mathematica outputs

"The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist."

Why is it unable to find only two instances of pythagorean triples, of which there are infinite (and plenty of small ones)?

$\endgroup$
  • $\begingroup$ FindInstance[ x^2 + y^2 == z^2 && 0 < x < 100 && 0 < y < 100 && 0 < z < 100, {x, y, z}, Integers, 2, RandomSeeding -> Automatic] $\endgroup$ – Okkes Dulgerci Jan 4 at 22:10
  • $\begingroup$ Amplifying on comment by @OkkesDulgerci, SortBy[FindInstance[ x^2 + y^2 == z^2 && 0 < x < 100 && 0 < y < 100 && 0 < z < 100, {x, y, z}, Integers, 104, RandomSeeding -> Automatic], Last] $\endgroup$ – Bob Hanlon Jan 5 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.