SP33039 AFS3 - Amazing Factor Sequence (hard)

Description

Let $ s_1(n) $ be the sum of positive **proper** divisors of $ n $ . For example, $ s_1(1) = 0 $ , $ s_1(2) = 1 $ and $ s_1(6) = 6 $ . Let $$ S(n) = \sum _{i=1}^n s_1(i). $$ Given $ N $ , find $ S(N) $ .

Input Format

First line contains $ T $ ( $ 1 \le T \le 10^5 $ ), the number of test cases. Each of the next $ T $ lines contains a single integer $ N $ . ( $ 1 \le N

Output Format

For each number $ N $ , output a single line containing $ S(N) $ .