#d1901. 最小生成数

最小生成数

Minimum Spanning Tree

Problem Description

There are n−1n-1 points, numbered from 22 to nn. The weight of the edge between point aa and point bb is lcm⁡(a,b)\operatorname{lcm}(a, b). Find the weight of the minimum spanning tree of these n−1n-1 points.

Input Format

The first line contains an integer TT.

The following TT lines each contain one integer nn.

Output Format

One number: the answer.

Sample Input

2
2
6

Sample Output

0
26

Constraints

For all data, T≤100, 2≤n≤107T\le 100,\ 2\le n \le 10^7.