Write an equation for nth term in the sequence: -2, 5, -10, 17, -26

To find the equation for the nth term in a sequence, we need to look for a pattern in the sequence.

Let's observe the differences between consecutive terms:
- The difference between the 1st and 2nd terms is 5 - (-2) = 7.
- The difference between the 2nd and 3rd terms is -10 - 5 = -15.
- The difference between the 3rd and 4th terms is 17 - (-10) = 27.
- The difference between the 4th and 5th terms is -26 - 17 = -43.

Notice that the differences alternate between positive and negative. This suggests that the sequence follows an alternating pattern.

To determine the pattern for the differences, we observe the pattern in the second differences:
- The difference between the 1st and 2nd differences is -15 - 7 = -22.
- The difference between the 2nd and 3rd differences is 27 - (-15) = 42.
- The difference between the 3rd and 4th differences is -43 - 27 = -70.

The second differences do not follow a consistent pattern. However, we can conclude that the sequence is a quadratic sequence because the second differences are not constant.

Let's represent the nth term of the sequence as a quadratic equation:

n^2 + an + b

To find a and b, we can substitute the values of n and the corresponding terms of the sequence into the equation:

For n = 1, the term is -2:
1^2 + a(1) + b = -2
1 + a + b = -2 ---(1)

For n = 2, the term is 5:
2^2 + a(2) + b = 5
4 + 2a + b = 5 ---(2)

Solving equations (1) and (2) simultaneously will give us the values of a and b.