For each set of four integers given (i,j,k,l) where 1≤i<j<k<l≤N. You are required to compute the following:
N∑i=1N∑j=i+1N∑k=j+1N∑l=k+1gcd(i,j,k,l)4
Input format
Output format
Print the answer for each test case Mod109+7 in a new line.
Constraints
1≤T≤101≤N≤105
For First Test case N=4 :
(1,2,3,4) : gcd(1,2,3,4)4 = 1
Total sum = 1
For Second Test Case N=5 :
(1,2,3,4) : gcd(1,2,3,4)4 = 1
(1,2,3,5) : gcd(1,2,3,5)4 = 1
(1,2,4,5) : gcd(1,2,4,5)4 = 1
(1,3,4,5) : gcd(1,3,4,5)4 = 1
(2,3,4,5) : gcd(2,3,4,5)4 = 1
Total sum = 1+1+1+1+1 = 5