Fix positive integers $m,n$. Is there a way to count the number of non-empty subsets $S$ of $[n] = \{1, \ldots, n\}$ such that $\gcd(S)$ is coprime to $m$? Can we come up with an expression for such a number? Here $\gcd(S) := \gcd(s_1, \ldots, s_k)$ if $S = \{s_1, \ldots, s_k\}$. Thanks!
Update: I have just realized this is known. See Theorem 2 (c) here: https://cs.uwaterloo.ca/journals/JIS/VOL15/ElBachraoui/elb25.pdf
It is known that $$ \#\left\{ S \subseteq [n] \ : \ \gcd(S, m) = 1, \ S \neq \emptyset \right\} = \sum_{d \mid m} \mu(d)2^{\lfloor\frac{n}{d}\rfloor}, $$ where $\mu$ is the Moebius function. See Theorem 2 (c) here: https://cs.uwaterloo.ca/journals/JIS/VOL15/ElBachraoui/elb25.pdf