My first try to find all sets with LCM=n was this: i.e. $n=60$
k = 0;
n = 60;
For[i = 2, i <= Length[Subsets[Divisors[n]]], i++,
If[Apply[LCM, Flatten[Take[Subsets[Divisors[n]], {i, i}]]] == n,
k = k + 1]];
k
and it worked for small $n$
then I found the OEIS series A076078 and there was this more efficient algorithm
f[n_] := Block[{d = Divisors[n]}, Plus @@ (MoebiusMu[n/d](2^DivisorSigma[0, d] - 1))];
f[60]
The problem is that I want $n$ to be a very large number.
In the comments on the OEIS page I found something very useful which I don't understand very well:
a(n)=1 iff n=1, a(p^k)=2^k, a(p*q)=10; where p & q are unique primes. a(n) cannot equal an odd number >1.
If m has more divisors than n, then a(m) > a(n).
If n is of the form p^rq^s where p & q are distinct primes and r & s are nonnegative integers then a(n)=2^(rs)(2^(r+s+1)-2^r-2^s+1).
Also if n=p_1^r_1*p_2^r_2*...*p_k^r_k where p_1,p_2,...,p_k are distinct primes and r_1,r_2,...,r_k are natural numbers then 2^(r_1*r_2*...*r_k)||a(n).
Can somebody explain 2^(r_1*r_2*...*r_k)||a(n) to me?