#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n;
    cin >> n;
    int a = 1 << n, b = 0;
    int j = 1;
    for (; j <= n / 2 - 1; ++j) a += 1 << j;
    for (; j < n; ++j) b += 1 << j;
    cout << (a - b) << endl;
  }
}
