For each positive integer n we may define the convergent sum $$ s(n)=\sum_{p}\frac{(n,p-1)}{p^2} $$ where the summation is over primes p and $(a,b)$ denotes the greatest common divisor of a,b.
It is immediate to deduce that s(n) is bounded on average:
Using $\sum \limits_{d|a, d|b}\phi(d)=(a,b)$ and inverting the order of summation we get
$s(n)=\sum_{d|n}\phi(d) a_d$ where $a_d=\sum_{p \equiv 1 (mod \ d)}p^{-2} $
Ignoring the fact that we sum over primes we get the bound $a_d \ll \frac{1}{d^2}$ which leads to $$\sum_{n \leq x}s(n) \ll x \sum_{d \geq 1}\frac{\phi(d)a_d}{d}=O(x) $$ and $$s(n) \ll \exp(\sum_{p|n}1)$$$$s(n) \ll \exp(\sum_{p|n}\frac{1}{p}).$$ The last inequality means that $s(n)$ stays bounded if $\omega(n)$ is bounded. Towards the other direction, it seems fair to expect that $s(n)$ grows to infinity if $\omega(n)$ is large in some quantitative sense, say $\omega(n) \geq (1+\epsilon) \log \log n$. Taking into account that the contribution to the sum $s(n)$ of the primes $p$ that satisfy $(p-1,n) \leq \frac{p}{\log p}$ is bounded, since $\sum_{p}\frac{1}{p \log p}$ converges, we see that $ s(n)=s'(n)+O(1)$ where $s'(n)=\sum_{ (p-1,n)>\frac{p}{\log p}} \frac{(n,p-1)}{p^2}$ We are therefore led to the question as to whether a condition of the form $\frac{\omega(n)}{\log \log n}-1 \gg 1$ can guarantee that $s'(n) \to +\infty$ Are there any non-trivial techniques that can be used to answer this question ?