Determine the total number of quadruplets (p, q, r, s) of positive integers with p < q < r < s < 100, such that: p+s = q+r and, q*r - p*s = 94.
let q = p + a
r = p + b
then s = (q + r) - p = p + a +b
94 = (q*r) - (p*s)
= (p^2 +ap +bp +ab) - (p^2 +ap +bp)
= ab
so (a,b) = (1,94) or (2,47)
if (a,b) = (1,94) then the minimum value of s occurs when p = 1. In this case, s = p + 1+94 = 96. Maximum s value = 99, so there are 4 solutions where a = 1.
if (a,b) = (2,47) then the minimum value of s occurs when p = 1. In this case, s = p + 2 + 47 = 50. Maximum s value = 99, so there are 50 solutions where a = 2.
Total number of solutions = 4 + 50 = 54