Determine the total number of quadruplets (A,B, C, D) of positive integers with A ≤ B ≤ C ≤ D ≤ 25, such that (A+B)*(C+D) is divisible by A*D – B*C, whenever A*D ≠ B*C.
Note: x refers to the
absolute value of x.
(In reply to
re: computer solution ... Do me a favor , Charlie by Ady TZIDON)
DEFDBL AZ
FOR a = 1 TO 25
FOR b = a TO 25
FOR c = b TO 25
FOR d = c TO 25
ctAll = ctAll + 1
num = (a + b) * (c + d)
den = ABS(a * d  b * c)
IF a * d = b * c THEN
PRINT TAB(40); a; b; c; d
ct0 = ct0 + 1
ELSE
IF num MOD den = 0 THEN
PRINT a; b; c; d
ct = ct + 1
END IF
END IF
NEXT
NEXT
NEXT
NEXT
PRINT ctAll, ct, ct0
finds
20475 for the overall count.

Posted by Charlie
on 20110207 12:20:15 