Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl: the Markov chain saw
 
PerlMonks  

Re^3: pythagorean triples

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://545204]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.