#include <iostream> using namespace std; int main() { int n,a; while (cin >> n) { while (n--) { cin >> a; long num = pow(2, a) + 2; cout << num << endl; } } }
a(n) = 2*a(n-1) -2
a(n) -2 = 2*{a(n-1) -2}
a(n) = 2^n + 2