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
(a, b, c): (19, 10, 7) or (19, 13, 10)
I thought about trying an analytic solution but so far just did a computational one.
------
big = 10000
for a in range(1,big):
for b in range(1,a):
c = a+b-22
if c<1:
continue
if c>=b:
continue
x = a+b*c
y = b+c*a
z = c+a*b
if y-x == z-y:
print(a,b,c,x,y,z,y-x,z-y)
a b c a+bc b+ca c+ab diff1 diff2
19 10 7 89 143 197 54 54
19 13 10 149 203 257 54 54
|
Posted by Larry
on 2022-09-21 08:10:09 |