Suppose a[]={1,2,3,4,5} and K=3
Sum of gcd of all subsequence of size k = gcd(1,2,3)+gcd(1,2,4)+gcd(1,2,5)+gcd(1,3,4)+gcd(1,3,5)+gcd(1,4,5)+gcd(2,3,4)+gcd(2,3,5)+gcd(2,4,5)+gcd(3,4,5).
How can we find this for different values of k?
- 2<=k<=100000
- 1<=n<=100000