You can use SUMPRODUCT for this.
Assuming X is in cell B1, and n is in cell B2:
=SUMPRODUCT((B1+1)^ROW(INDIRECT("1:"&B2)))
ROW(INDIRECT("1:"&B2)) returns an array of the numbers between 1 and n, which SUMPRODUCT raises each X+1 by before summing.
Output
