> #{x<=N:x is prime}=N/log(N)+o(1).

Careful with this, you've quoted the error term wrong. The PNT statement

should be,

#{x<=N:x is prime}=(N/log N)*(1+o(1))

i.e. the o(1) is relative error, not absolute. Even on the Riemann

hypothesis, the best error term that we could hope for is O(N^1/2). If

the PNT was as you stated it, then there'd be a lot less 'roughness' to

your calculations...

Andy