-1,2, - 4,8, - 16,32. According to the law, how can the nth number be expressed by the formula?

-1,2, - 4,8, - 16,32. According to the law, how can the nth number be expressed by the formula?

The rule of absolute value is to multiply from 1, which can be expressed by 2 ^ (n-1)
The sign rule is that the odd term is negative and the even term is positive, which can be represented by (- 1) ^ n
So the nth number can be represented by (- 1) ^ n * 2 ^ (n-1)