Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: pythagorean triples

by chas (Priest)
on Apr 24, 2006 at 04:36 UTC ( #545204=note: print w/ replies, xml ) Need Help??


in reply to Re^2: pythagorean triples
in thread pythagorean triples

Well, it's true that the primitive triples are of that form, but not conversely; 6,8,10 occurs for n=3,m=1 (which are coprime), and that triple isn't primitive. So the code generates primitive (i.e. having no common factor) triples, but some others as well. The real point is that it isn't so easy to print a list of all Pythagorean triples without duplication, and I guess that thought was what motivated my reply.


Comment on Re^3: pythagorean triples

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://545204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2015-07-29 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls