Determine all possible triplets (a,b,c) of positive integers, with a>b>c, such that:
- a+bc < b+ca < c+ab are three expressions in arithmetic sequence, and:
- a+b-c=22
clc
for c=1:100
for b=c+1:c+22
a=22-(b-c);
if a<=b
break
end
if a+b*c < b+c*a && b+c*a < c+a*b && ...
a+b*c - (b+c*a) == b+c*a - (c+a*b)
disp([a b c])
disp([a+b*c , b+c*a , c+a*b])
disp(' ')
end
end
end
finds
19 10 7 [a, b, c]
89 143 197 [a+b*c , b+c*a , c+a*b]
19 13 10 [a, b, c]
149 203 257 [a+b*c , b+c*a , c+a*b]
|
Posted by Charlie
on 2022-09-21 09:29:29 |