Assuming an averaged form of Mertens’ conjecture and that the ordinates of the non-trivial zeros of the Riemann zeta function are linearly independent over the rationals, we analyse the finer structure of the terms in a well-known formula of Ramanujan.