I wrote an article documenting my experience solving Project Euler problem 543. It's a surprisingly deep problem, and using a specialized algorithm sped up my solution by two orders of magnitude. (Wrote initial draft 12/2016, updated 8/2019).<p>https://acgan.sh/posts/2016-12-23-prime-counting.html<p>I'd love some feedback here - in general I'm quite surprised this isn't a well known technique in many libraries (even amongst my mathy friends).