1 3 7 15 31 63. How to express rules with letters

1 3 7 15 31 63. How to express rules with letters

2^n-1
That is, the nth power of 2 - 1