#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n, total, i;
    cin >> n;
    total = (1 << n) + (1 << (n / 2)) - 2;
    total = total - ((1 << n) - (1 << (n / 2)));
    cout << total << endl;
  }
}
