I want to write a predicate in prolog which is correct when in a given list you can find three consecutive numbers whose sum is equal to Sum. For example: ?- sum([1,4, -2,13