Suppose $p$ is a prime number and suppose we are working modulo $p$. Moreover, suppose we know that $a$ and $p-1$ are two coprime integers ($a < p$). What is the probability that $a +d \bmod p$ is coprime with respect to $p-1$ as well? I mean. Are the events $B=$"$a$ is coprime wrt $p-1$" and $A=$"$a + d \bmod p$ is coprime wrt $p-1$" independent or not? Moreover, what could be the probability $P(A | B)$?
I think the answer is strictly linked to this question where we can use $p-1$ as $b$ and $c$ (nobody says $b \neq c$ in that question). Now, if $gcd(a,p-1) =1$ then there exists $x$ such that $gcd(a+x(p-1),p-1)=1$. Furthermore , here there is a statement about the number of such $x$'s. They are $\phi(p-1)$ and "they are also at least as frequent as integers $x$ satisfying $gcd(x,p-1)=1 $ ".
Coming back to my questions, if $a$ and $p-1$ are coprime, then the probability that $a+d \bmod p$ and $p-1$ of being coprime is equal to the probability that $d = x(p-1)$ for $x$ coprime wrt $p-1$.
Suppose we are working in a range $[0,n(p-1)]$. Then the probability of $d$ being a multiple of $p-1$ in that range is $1/p-1$. Moreover, the probability of $x$ being coprime wrt $p-1$ should be more or less $6/\pi^2$.
Finally, the probability we are looking for is $$P(A | B) = \dfrac{6}{\pi^2 (p-1)} $$
Can this reasoning work?
Since $d$ goes from $0$ to $p-1$, $(a+d) \mod p$ would also go from $0$ to $p-1$ no matter what $a$ is. Therefore $A$ and $B$ are independent and $P(A) = P(B) = P(A|B)$.
Note that $$P(A)=P(B)=P(A|B) = \frac{\sum_{k=0}^{p-1} \left[ \gcd(n, p-1)=1 \right]}{p} = \frac{\phi(p-1)}{p}$$
for $p \ge 3$, where $\phi$ is Euler's totient function