| 1 | initial version |
For the exact value you can use:
sum(log(p) for p in primes_first_n(100))
or for an approximate numerical value:
sum(log(p).n() for p in primes_first_n(100))
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.