Considering, for example, bc being a concatenation of b and c, rather than the product of b and c:
DEFDBL A-Z
OPEN "strange equation.txt" FOR OUTPUT AS #2
FOR tot = 1 TO 6000
IF tot MOD 100 = 0 THEN PRINT tot;
FOR c = 1 TO tot - 2
IF INKEY$ = CHR$(27) THEN GOTO endit
t = tot - c
FOR a = 1 TO t / 2
b = t - a
v = gcd(a * a, b * b) + gcd(a, concat(b, c)) + gcd(b, concat(a, c)) + gcd(c, concat(a, b))
IF v = 199 THEN PRINT a, b, c: PRINT #2, a, b, c,gcd(a * a, b * b) ; gcd(a, concat(b, c)) ; gcd(b, concat(a, c)) ; gcd(c, concat(a, b)): ct = ct + 1
NEXT
NEXT
IF ct > 250 THEN GOTO endit
NEXT
endit:
CLOSE
END
FUNCTION gcd (x, y)
dnd = x: dvr = y
IF dnd < dvr THEN SWAP dnd, dvr
DO
q = INT(dnd / dvr)
r = dnd - q * dvr
dnd = dvr: dvr = r
LOOP UNTIL r = 0
gcd = dnd
END FUNCTION
FUNCTION concat (a, b)
concat = VAL(LTRIM$(STR$(a)) + LTRIM$(STR$(b)))
END FUNCTION
which stops after finding 251 solutions and finds
(the most outstanding of which is (a,b,c) = (12,72,53), where we get 144 + 1 + 1 + 53 = 199)
terms of
a b c the equation
14 14 1 196 1 1 1
14 14 3 196 1 1 1
14 14 5 196 1 1 1
14 14 9 196 1 1 1
14 14 11 196 1 1 1
14 14 13 196 1 1 1
14 28 1 196 1 1 1
14 14 15 196 1 1 1
14 14 17 196 1 1 1
14 28 5 196 1 1 1
14 14 19 196 1 1 1
14 14 23 196 1 1 1
14 28 11 196 1 1 1
14 14 25 196 1 1 1
14 28 13 196 1 1 1
14 14 27 196 1 1 1
14 14 29 196 1 1 1
14 42 3 196 1 1 1
14 14 31 196 1 1 1
14 42 5 196 1 1 1
14 28 19 196 1 1 1
14 14 33 196 1 1 1
14 42 9 196 1 1 1
14 28 23 196 1 1 1
14 14 37 196 1 1 1
14 42 11 196 1 1 1
14 28 25 196 1 1 1
14 14 39 196 1 1 1
14 14 41 196 1 1 1
14 56 1 196 1 1 1
28 42 1 196 1 1 1
14 42 15 196 1 1 1
14 28 29 196 1 1 1
14 14 43 196 1 1 1
14 56 3 196 1 1 1
28 42 3 196 1 1 1
14 42 17 196 1 1 1
14 28 31 196 1 1 1
14 14 45 196 1 1 1
14 56 5 196 1 1 1
14 14 47 196 1 1 1
14 56 9 196 1 1 1
28 42 9 196 1 1 1
14 42 23 196 1 1 1
14 28 37 196 1 1 1
14 14 51 196 1 1 1
14 56 11 196 1 1 1
14 14 53 196 1 1 1
28 42 13 196 1 1 1
14 42 27 196 1 1 1
14 28 41 196 1 1 1
14 14 55 196 1 1 1
14 70 1 196 1 1 1
14 56 15 196 1 1 1
28 42 15 196 1 1 1
14 42 29 196 1 1 1
14 28 43 196 1 1 1
14 14 57 196 1 1 1
14 56 17 196 1 1 1
14 14 59 196 1 1 1
14 56 19 196 1 1 1
28 42 19 196 1 1 1
14 42 33 196 1 1 1
14 28 47 196 1 1 1
14 14 61 196 1 1 1
14 56 23 196 1 1 1
14 14 65 196 1 1 1
14 70 11 196 1 1 1
14 56 25 196 1 1 1
28 42 25 196 1 1 1
14 42 39 196 1 1 1
14 28 53 196 1 1 1
14 14 67 196 1 1 1
14 70 13 196 1 1 1
14 56 27 196 1 1 1
28 42 27 196 1 1 1
14 42 41 196 1 1 1
14 28 55 196 1 1 1
14 14 69 196 1 1 1
28 70 1 196 1 1 1
14 56 29 196 1 1 1
14 14 71 196 1 1 1
14 84 3 196 1 1 1
28 70 3 196 1 1 1
42 56 3 196 1 1 1
14 70 17 196 1 1 1
14 56 31 196 1 1 1
28 42 31 196 1 1 1
14 42 45 196 1 1 1
14 28 59 196 1 1 1
14 14 73 196 1 1 1
14 84 5 196 1 1 1
42 56 5 196 1 1 1
14 70 19 196 1 1 1
14 56 33 196 1 1 1
28 42 33 196 1 1 1
14 42 47 196 1 1 1
14 28 61 196 1 1 1
14 14 75 196 1 1 1
14 84 9 196 1 1 1
28 70 9 196 1 1 1
42 56 9 196 1 1 1
14 70 23 196 1 1 1
14 56 37 196 1 1 1
28 42 37 196 1 1 1
14 42 51 196 1 1 1
14 28 65 196 1 1 1
14 14 79 196 1 1 1
14 84 11 196 1 1 1
28 70 11 196 1 1 1
42 56 11 196 1 1 1
28 42 39 196 1 1 1
14 42 53 196 1 1 1
14 28 67 196 1 1 1
14 14 81 196 1 1 1
28 70 13 196 1 1 1
14 56 41 196 1 1 1
14 14 83 196 1 1 1
14 98 1 196 1 1 1
42 70 1 196 1 1 1
14 84 15 196 1 1 1
42 56 15 196 1 1 1
14 70 29 196 1 1 1
14 56 43 196 1 1 1
28 42 43 196 1 1 1
14 42 57 196 1 1 1
14 28 71 196 1 1 1
14 14 85 196 1 1 1
14 98 3 196 1 1 1
42 70 3 196 1 1 1
14 84 17 196 1 1 1
28 70 17 196 1 1 1
42 56 17 196 1 1 1
14 70 31 196 1 1 1
14 56 45 196 1 1 1
28 42 45 196 1 1 1
14 42 59 196 1 1 1
14 28 73 196 1 1 1
14 14 87 196 1 1 1
14 98 5 196 1 1 1
28 70 19 196 1 1 1
14 56 47 196 1 1 1
14 14 89 196 1 1 1
14 98 9 196 1 1 1
42 70 9 196 1 1 1
14 84 23 196 1 1 1
28 70 23 196 1 1 1
42 56 23 196 1 1 1
14 70 37 196 1 1 1
14 56 51 196 1 1 1
28 42 51 196 1 1 1
14 42 65 196 1 1 1
14 28 79 196 1 1 1
14 14 93 196 1 1 1
14 98 11 196 1 1 1
14 56 53 196 1 1 1
14 14 95 196 1 1 1
14 98 13 196 1 1 1
42 70 13 196 1 1 1
14 84 27 196 1 1 1
28 70 27 196 1 1 1
42 56 27 196 1 1 1
14 70 41 196 1 1 1
14 56 55 196 1 1 1
28 42 55 196 1 1 1
14 42 69 196 1 1 1
14 28 83 196 1 1 1
14 14 97 196 1 1 1
14 112 1 196 1 1 1
28 98 1 196 1 1 1
56 70 1 196 1 1 1
14 98 15 196 1 1 1
14 84 29 196 1 1 1
28 70 29 196 1 1 1
42 56 29 196 1 1 1
14 70 43 196 1 1 1
14 56 57 196 1 1 1
28 42 57 196 1 1 1
14 42 71 196 1 1 1
14 14 99 196 1 1 1
14 98 17 196 1 1 1
28 70 31 196 1 1 1
14 56 59 196 1 1 1
14 112 5 196 1 1 1
28 98 5 196 1 1 1
14 98 19 196 1 1 1
42 70 19 196 1 1 1
14 84 33 196 1 1 1
28 70 33 196 1 1 1
42 56 33 196 1 1 1
14 70 47 196 1 1 1
14 56 61 196 1 1 1
28 42 61 196 1 1 1
14 42 75 196 1 1 1
14 28 89 196 1 1 1
14 14 103 196 1 1 1
14 98 23 196 1 1 1
28 70 37 196 1 1 1
14 14 107 196 1 1 1
14 112 11 196 1 1 1
28 98 11 196 1 1 1
56 70 11 196 1 1 1
14 98 25 196 1 1 1
14 84 39 196 1 1 1
28 70 39 196 1 1 1
42 56 39 196 1 1 1
12 72 53 144 1 1 53
14 70 53 196 1 1 1
14 56 67 196 1 1 1
28 42 67 196 1 1 1
14 42 81 196 1 1 1
14 28 95 196 1 1 1
14 14 109 196 1 1 1
14 112 13 196 1 1 1
28 98 13 196 1 1 1
56 70 13 196 1 1 1
14 98 27 196 1 1 1
42 70 27 196 1 1 1
14 84 41 196 1 1 1
42 56 41 196 1 1 1
14 56 69 196 1 1 1
28 42 69 196 1 1 1
14 42 83 196 1 1 1
14 28 97 196 1 1 1
14 14 111 196 1 1 1
14 98 29 196 1 1 1
28 70 43 196 1 1 1
14 56 71 196 1 1 1
14 14 113 196 1 1 1
14 126 3 196 1 1 1
42 98 3 196 1 1 1
14 112 17 196 1 1 1
28 98 17 196 1 1 1
56 70 17 196 1 1 1
14 98 31 196 1 1 1
42 70 31 196 1 1 1
14 84 45 196 1 1 1
42 56 45 196 1 1 1
14 70 59 196 1 1 1
14 56 73 196 1 1 1
28 42 73 196 1 1 1
14 42 87 196 1 1 1
14 28 101 196 1 1 1
14 14 115 196 1 1 1
14 126 5 196 1 1 1
42 98 5 196 1 1 1
14 112 19 196 1 1 1
28 98 19 196 1 1 1
56 70 19 196 1 1 1
14 98 33 196 1 1 1
42 70 33 196 1 1 1
14 84 47 196 1 1 1
28 70 47 196 1 1 1
42 56 47 196 1 1 1
14 70 61 196 1 1 1
14 56 75 196 1 1 1
28 42 75 196 1 1 1
14 42 89 196 1 1 1
&nb
|
Posted by Charlie
on 2013-03-17 12:07:31 |