#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; ll gcd(ll a, ll b){return (b==0?a:gcd(b,a%b));} ll solve(ll N){ ll ret = 0; ret += N*N; ret += (N*N-N); { ll sum = 0; for(ll a=2; a<=sqrt(N); a++){ ll x = (ll)(log(N)/log(a)+1e-8); for(ll b=2; b<=x; b++){ ll y = N/b; sum += y; } } ret += 2*sum; } { ll sum = 0; for(ll b=2; bN) break; sum += N/d; } } } } ret += 2*sum; } return ret; } int main(){ int T; cin >> T; while(T--){ ll N; cin >> N; cout << solve(N) << endl; } return 0; }