#include<bits/stdc++.h>
using namespace std;
void solve(){
long long n;
cin>>n;
long long sum = (1+n*n) / 2 * n;
cout<<sum<<endl;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
// freopen("input.txt", "r", stdin);
int t = 1;
cin>>t;
while(t--)
solve();
}