Results 1 to 16 of 16

Thread: Pythagoras theorem.

  1. #1

    Thread Starter
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307

    Pythagoras theorem.

    Hi,

    I would wanna know how to be able to find groups of numbers who are valid groups for the known pythagoras theorem (a^2+b^2=c^2)

    I mean, how can I represent A, B, and C with a general variable, let's say n.

    so:

    A = something with n
    B = something with n
    C = something with n

    so A^2+B^2=C^2

    therefore, when I know the number A, I can know also the numbers B and C

    of course that in this way, B and C would be only one option for making a group with A.

    I hope I made myself clear, sorry, that's my poor english level so far.

  2. #2
    Addicted Member
    Join Date
    Feb 2001
    Posts
    198
    I found this which looks a little like you asked for:

    The Babylonians were so advanced, they had a theorem for discovering Pythagorian triples.

    If p and q take on all whole values subject only to the conditions

    1) p > q > 0,
    2) p and q have no common divisors other than 1,
    3) p and q are not both odd,
    then the expressions
    x = p2 - q2,
    y = 2pq
    z = p2 + q2,
    will produce all reduced Pythagorean number triples, and each triple only once. (Aaboe 30-31)

    From:http://nova.bsuvc.bsu.edu/~00dbwolfe/paper.htm

  3. #3
    jim mcnamara
    Guest
    Here is an extensive discussion of Pythagorean triples, with several ways to enumerate all of them.

    http://mathworld.wolfram.com/PythagoreanTriple.html

    Generally, you count only those which consist of relatively prime numbers, since there is a group of infinite arrays that contain all of the infinitely many pythaogrean triples.

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Starman: I hope you meant the following.

    x = p^2 - q^2 or p*p - q*q

    y = 2pq

    z = p^2 + q^2 or p*p + q*q
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  5. #5
    Addicted Member
    Join Date
    Feb 2001
    Posts
    198
    Hi Guv,

    I haven't seen you around for a bit.

    I did mean that, it's something I found on the web. I just pasted it in and it lost the superscript for the 2's.

    Thanks for the correction.

    I must check what I have posted.
    I must check what I have posted.
    I must check what I have posted.
    I must check what I have posted.
    I must......

  6. #6
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Just so you know...

    X[sup]2[/sup] produces x2
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  7. #7
    Addicted Member
    Join Date
    Feb 2001
    Posts
    198
    testing...

    X[s<i></i>up]2[/s<i></i>up] produces x<sup>2</sup></font></p>

    X2

  8. #8
    Addicted Member
    Join Date
    Feb 2001
    Posts
    198
    oops!

    wrong button

    Sorry I should have hit preview.



    Thanks SLH, it works.

  9. #9
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    Oh wow, that's really cool. I never knew that before...

    x2 x2 x2 x2
    x2 x2 x2 x2
    x2 x2 x2 x2
    There are 10 types of people in the world - those that understand binary, and those that don't.

  10. #10
    jim mcnamara
    Guest
    This is cool too:

    x2

  11. #11
    jim mcnamara
    Guest
    Oooooops.

    [ sub ]2[ /sub ] for a subscript

  12. #12
    Frenzied Member nishantp's Avatar
    Join Date
    Jan 2001
    Location
    Where you least expect me to be
    Posts
    1,375

    Re: Pythagoras theorem.

    Originally posted by Lior
    Hi,

    I would wanna know how to be able to find groups of numbers who are valid groups for the known pythagoras theorem (a^2+b^2=c^2)

    I mean, how can I represent A, B, and C with a general variable, let's say n.

    so:

    A = something with n
    B = something with n
    C = something with n

    so A^2+B^2=C^2

    therefore, when I know the number A, I can know also the numbers B and C

    of course that in this way, B and C would be only one option for making a group with A.

    I hope I made myself clear, sorry, that's my poor english level so far.

    btw heres some VB code that'll do that for you. Make a multiline textbox with a scroll bar, and add this to a button:

    VB Code:
    1. Dim A As Long
    2.     Dim B As Long
    3.     Dim D As Long
    4.     Dim N As Long
    5.     Dim M As Long
    6.    
    7.     For M = 1 To 1000
    8.         N = M + 1
    9.         A = Sqr(N) - Sqr(M)
    10.         B = 2 * N * M
    11.         c = Sqr(N) + Sqr(M)
    12.         Text1 = Text1 & A & "²" & vbTab & B & "²" & vbTab & "= " & c & "²" & vbCrLf
    13.     Next
    I just applied the formula.
    You just proved that sig advertisements work.

  13. #13
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    There is no single parameter method for creating general pythagorean triples. The best you can do is something like the formulae Starman posted. Repeated below.

    Choose p & q as per the following.

    p > q
    p & q must have no common factor.
    Either p or q (not both) must be odd.

    Then

    x = 2*p*q
    y = p2 - q2
    z = p2 + q2

    Using the above, x is sometimes smaller than y & sometimes larger.

    Some examples.

    (2, 1) results in (3, 4, 5)
    (3,2) results in (5, 12, 13)
    (8, 3) results in (48, 55, 73)

    If (u, v) have a common factor or if both are odd, you get a pythagorean triple with a common factor. For example.

    (3, 1) results in (6, 8, 10) or twice (3, 4, 5)
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  14. #14
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    The following use a single parameter, but will not generate all Pythagorean triples as will the (p, q) pairs described in a previous post.

    2*n, n2 - 1, n2 + 1, where n is even.

    4*n, n2 - 4, n2 + 4, where n is odd

    The above are based on the previously posted (p, q) formulae.

    x = 2*p
    y = p2 - q2
    z = p2 + q2

  15. #15
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    The following use a single parameter, but will not generate all Pythagorean triples as will the (p, q) pairs described in a previous post.

    2*n, n2 - 1, n2 + 1, where n is even.

    4*n, n2 - 4, n2 + 4, where n is odd

    The above are based on the previously posted (p, q) formulae.

    x = 2*p
    y = p2 - q2
    z = p2 + q2

    The (p, q) formulae can be used to generate other single parameter formulae.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  16. #16
    New Member
    Join Date
    Jul 2002
    Posts
    5

    easy way!

    take an odd number... say 5
    square it to get 25. take the two numbers closest to each other that add up to 25 (12 and 13). now 5, 12, and 13 are your numbers.

    say you have an even number ... say 6. divide it by two until you get an odd number. in this case 3. repeat above steps...
    3*3 and get 9. get 4 and 5 because they are the closest numbers to each other that add up to 9. since we divided 6 by 2 only once, multiply 4 and 5 by two to get 8 and 10. now, we have 6 (our original #) and 8 and 10. voila!

    powers of 2 dont work as the lowest of the 3 numbers.
    dildog in the hizzee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width