Hi,
I am learning mobius inversion and i encounter a problem which I really didnt know whether this problem can be solve using mobius or not .If (Yes) then tell me how todo with mobius and if (Not) then tell me some other approach to solve this.
question - Given an array of integers (A) and a single integer (B) . Find the number of unordered pairs of (i,j) such that gcd(A[i],A[j]) is greater than (B) {gcd(A[i],A[j]) >B} . Answer should be large so we modulo it with 1e9+7.
This question was not from any ongoing contest .
Link where I encounter above question - Number of pairs with GCD(a[i], a[j]) > 1 - Codeforces
Array length - 1e5
1 <= A(i) <=1e5
1 <= B <= 1e5