Series involving primes Trying to find an asymptotic bound for the series
$$
S(x) =\sum_{p\leq x}\frac{\varphi(p-1)}{(p-1)p}
$$
as $x \rightarrow \infty$. Of course
$$
\frac{\varphi(p-1)}{p-1} =\prod_{q\mid p-1}\left(1-\frac1{q}\right) \leq 1
$$
so $S(x)=O(\log\log x)$, but I'd like to know if it's possible to do better.

It is known that
$$
\sum_{p\le x} \frac{\phi(p-1)}{p-1} \sim C \mathop{\rm li}(x), \tag1
$$
with an error term of equal quality to that of the prime number theorem; here the constant $C$ is a product over all primes:
$$
C = \prod_p \bigg( 1 - \frac1{p(p-1)} \bigg).
$$
In other words, "the average value of $\phi(n)/n$ on shifted primes $p-1$ is $C$". Thus it seems reasonable to expect that your sum is asymptotic to $C\log\log x$, and indeed that is the case: one can derive this asymptotic formula from (1) via partial summation.
A generalization of (1) appears as Exercise 5 in Section 11.4 of Montgomery/Vaughan's Multiplicative Number Theory I, and the methods of Section 11.4 are quite appropriate for proving (1) (or indeed your problem directly). The generalization is due to Vaughan, "Some applications of Montgomery's sieve", J. Number Theory 5 (1973).
