You can use NestList
or FoldList
for this purpose in Mathematica. Here's a basic outline:
listOfTriplets = {{a1, b1, c1}, {a2, b2, c2}, ...};
f[{a_, b_, c_}, previousValue_] := (* Your function here *);
initialValue = (* Your initial value *);
result = FoldList[f, initialValue, listOfTriplets];
This way, FoldList
will handle the dependency on the previous value efficiently.