(This post is an offshoot of this MSE question.)
Let $\sigma(x)$ denote the sum of divisors of $x$. (https://oeis.org/A000203)
QUESTION
Is the asymptotic density of positive integers $n$ satisfying $\gcd(n, \sigma(n^2))=\gcd(n^2, \sigma(n^2))$ equal to zero?
I tried searching for examples and counterexamples to the equation $$\gcd(n, \sigma(n^2))=\gcd(n^2, \sigma(n^2))$$ via Sage Cell Server, it gave me this output for the following Pari-GP script:
for(x=1, 100, if(gcd(x,sigma(x^2))==gcd(x^2,sigma(x^2)),print(x)))
All positive integers from $1$ to $100$ (except for the integer $99$) satisfy $\gcd(n, \sigma(n^2))=\gcd(n^2, \sigma(n^2))$.
Generalizing the first (counter)example of $99$ is trivial.
If ${3^2}\cdot{11} \parallel n$, then $11 \parallel \gcd(n,\sigma(n^2))$ and $11^2 \parallel \gcd(n^2,\sigma(n^2))$. So the asymptotic density in question is less than $$1-\frac{2}{3^3}\cdot\frac{10}{11^2} = \frac{3247}{3267} \approx 0.993878.$$
Also, if $3 \parallel n$, then with probability $1$ there exist two distinct primes $y$ and $z$ congruent to $1$ modulo $3$ such that $y \parallel n$ and $z \parallel n$. In this case, we get $3 \parallel \gcd(n,\sigma(n^2))$ and $3^2 \parallel \gcd(n^2,\sigma(n^2))$. So the asymptotic density in question is less than $$1-\frac{2}{3^2} = \frac{7}{9} \approx 0.\overline{777}.$$
The real open problem is whether the asymptotic density is $0$.