#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  int t;
  std::cin >> t;
  while (t--) {
    int n, a[100], b[100];
    std::cin >> n;
    for (int i = 1; i <= n / 2; i++) a[i] = pow(2, i);
    for (int i = (n / 2) + 1; i <= n; i++) b[i] = pow(2, i);
    std::cout << "\n" << b[(n / 2) + 1] - a[1];
  }
  return 0;
}
