All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Going Digital With Pythagoras (Posted on 2008-11-08) Difficulty: 2 of 5
Determine all possible list(s) of pythagorean triple (a,b,c), with 0 < a < b < c < 100, such that we will obtain another pythagorean triple (p,q,r) by inserting the same nonzero digit to the left of each of a, b and c. None of a, b and c can contain any leading zeroes.

Note: Try to derive a non computer assisted method, although computer program/spreadsheet solutions are welcome.

See The Solution Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3

FOR a = 1 TO 98
FOR b = a + 1 TO 99
FOR c = b + 1 TO 100
 IF a * a + b * b = c * c THEN
   FOR i = 1 TO 9
     ia = VAL(LTRIM$(STR$(i)) + LTRIM$(STR$(a)))
     ib = VAL(LTRIM$(STR$(i)) + LTRIM$(STR$(b)))
     ic = VAL(LTRIM$(STR$(i)) + LTRIM$(STR$(c)))
     IF ia * ia + ib * ib = ic * ic THEN PRINT a; b; c, i
   NEXT
 END IF
NEXT
NEXT
NEXT

finds

5  12  13

with the appropriate digit prefix being a 1.


  Posted by Charlie on 2008-11-08 17:12:49
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information