Sorry, I need to give more info on my problem.
I have a large set of primitive Pythagorean triples, generated by the code in the PrimitivePythagoreanTriple.nb:
prim=With[{max=100},\[IndentingNewLine]Map[Last,List@@(Reduce[x^2+y^2\[Equal]z^2 && 0< x < y <max&&0<z<max &&GCD[x,y,z]\[Equal]1,{x,y,z},Integers,Backsubstitution->True]/.And:>List),{2}]]
I wish to graph this discrete set in the xy-plane using ListPlot (after I add Table[ … ] to the resulting set of pairs).
This requires changing the triples {x,y,z} to pairs {x,y}, same first and second coordinates.
I can do it on a single triple, obviously, but how do I write a code to make the new list of pairs from the list of triples?
Here’s a sample of what the outcome should look like (see attached).
I’ve tried everything I can find and/or think of.
Any suggestions will be appreciated.
Thanks,
JP




