#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int getG(int n){
if(n == 1){
return 2;
}else{
return 3 * getG(n-1) +2;
}
}
long long func(int n){
if(n == 1){
return 2;
}else{
return getG(n-1)+2;
}
}
int main(){
int t, n;
long long ans;
while (cin >> t) {
while(t--){
cin >> n;
ans = func(n);
cout << ans << endl;
}
}
return 0;
}
京公网安备 11010502036488号