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

t(1)=-2

t(2)=5
t(3)=-10
...
Hint:
compare 2,5,10,17,26
and 1,4,9,16,25....
The sign can be achieved by multiply by the factor (-1)^n

To find the equation for the nth term in the sequence -2, 5, -10, 17, -26, we need to determine the pattern or rule that governs how each term relates to its position in the sequence.

Looking at the given sequence, we can observe that the sign of each term alternates between negative and positive. The sequence starts with a negative number (-2) and then alternates between adding multiples of 3 and subtracting multiples of 5.

To break it down and find the general formula, we can first establish the pattern:

Term 1: -2 (start with a negative number)
Term 2: -2 + (2 * 3) = 5
Term 3: 5 - (3 * 5) = -10
Term 4: -10 + (4 * 3) = 17
Term 5: 17 - (5 * 5) = -26

From this pattern, we can formulate the equation for the nth term:

If n is odd, then the nth term = -2 + (n * 3)
If n is even, then the nth term = -2 - (n * 5)

Considering this, we can combine the two equations using the floor function:

The equation for the nth term in the sequence is:
nth term = (-1)^(n-1) * (2 + floor((n-1)/2) * 8)

This equation takes into account the alternate signs and the addition/subtraction of multiples of 3 and 5.