#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  for (cin >> t; t; t--) {
    int n;
    cin >> n;
    long long first_pile = 0, second_pile = 0;
    first_pile = 1 << n;
    for (int i = 1; i < n / 2; i++) {
      first_pile += 1 << i;
    }
    for (int i = n / 2; i < n; i++) {
      second_pile += 1 << i;
    }
    cout << abs(first_pile - second_pile) << '\n';
  }
  return 0;
}
