it calculates the x1*x2 + x2*x3 +.... +x(n-m)*xn m is the distance between each number enter the value of the first and the last number then enter in the distance between each
ok ts is wrong somewhere