Around 2014 I wrote a paper about the distribution of the prime numbers and some related aspects. Since then I have taken the general idea and employed it in many different ways. This was before I was familiar with Latex. The paper needs to be updated with all the new versions of the formula added as well as for formatting. For now here is the original paper.
The paper provides a method using periodic functions to check for primality, count factors of any number, list all factors of any number, calculate the exact prime distribution, and determine the Nth prime. It describes this method from one equation to the next, using graphs between each key step to help quickly visualize the reasoning and result of each maneuver. It concludes with brief afterthoughts and ongoing questions about the technique. The picture below is the NumFac function while not including 1 as a factor.