It appears to me that the formula given requires pre-existing knowledge of the list of primes in order the expand the series.