题目描述
Kancha likes calculating gcf very much !! Where gcf(x,y) is the greatest common factor of x and y.
He wants to calculate the sum of GCF's of all possible pairs in an array, where array of size N consists of numbers from 1 to N.
Input:
Input contains an integer t, which is the number of test cases, then t lines follow where each line contains an integer N, where N is the size of array.
Output:
Output the sum of GCD of all numbers taken pairwise.
Constraints:
0<t ≤ 10
1 ≤ N ≤ 400000
SAMPLE INPUT
1
3
SAMPLE OUTPUT
3
Explanation
gcd(1,2) = 1
gcd(1,3) = 1
gcd(2,3) = 1
total = 3
输入格式
见题面
输出格式
见题面
样例输入
10
4095
2456
1153
1424
1686
1893
5432
3412
7428
3199
样例输出
40291404
13542278
2680028
4216536
6063088
7772619
73382810
27315827
142461679
23811464