TITLE: Probability that $n$ is coprime to both $m$ and $m+1$
QUESTION [17 upvotes]: It is well known that the set $\{(n,m) \in \Bbb N^2 : \gcd(n,m) = 1\}$ of coprime integers has a natural density of $\zeta(2)^{-1}$ in $\Bbb N^2$.
It seems reasonable to think that the density of the $\{(n,m) \in \Bbb N^2 : \gcd(n,m(m+1))=1\}$ is still positive. I am no specialist of this kind of questions so I fail to see a simple argument why.
Would you have any hint?

REPLY [21 votes]: The density exists and equals
$$ C:=\sum_d\frac{\mu(d)\tau(d)}{d^2}=\prod_p\left(1-\frac{2}{p^2}\right)\approx 0.322634\ . $$
Note that the right hand side is the product of local densities over the primes.
Indeed, the number of pairs $(n,m)\in\mathbb{N}^2$ with $1\leq n,m\leq x$ and $\gcd(n,m(m+1))=1$ equals
$$ \sum_{\substack{n,m\leq x\\\gcd(n,m(m+1))=1}} 1 = \sum_{n,m\leq x} \ \ \sum_{d\mid\gcd(n,m(m+1))} \mu(d) = \sum_{d\leq x}\mu(d)\sum_{\substack{n,m\leq x\\d\mid\gcd(n,m(m+1))}} 1$$
$$ = \sum_{d\leq x}\mu(d)\tau(d)\left(\frac{x}{d}+O(1)\right)^2 = x^2\sum_{d\leq x}\frac{\mu(d)\tau(d)}{d^2}+O\left(x\sum_{d\leq x}\frac{\tau(d)}{d}\right)$$
$$ = x^2\left(C+\frac{\log(x)}{x}\right)+O\left(x\log^2(x)\right) = x^2 C+O\left(x\log^2(x)\right). $$
Hence the density of such pairs equals, as $x\to\infty$,
$$ x^{-2}\sum_{\substack{n,m\leq x\\\gcd(n,m(m+1))=1}} 1=C+O\left(x^{-1}\log^2(x)\right) = C+o(1). $$