I cannot comment on Bibby's excellmnt review of pi and Pascal's trig function proof. The second question, what are the origins of prime numbers can be detailed by reading 4,000 year of Egyptian fraction texts.
The 1650 BCE Ahmes Papyrus (better known as the Rhind Mathematical Papyrus) took up 1/3 of its space to define the econversion of 2/n to concuse unit fraction series. To decode Ahmes work in historical context required the use of LCMs that scaled 2/n by LCM m/m to 2m/mn before the best prime factors of denominator mn were summed to numerator 2m, as discussed by:
To Ahmes pi was formally written as 256/81, a poor estimate, overstating the 'gallons; of grain in a round cycle type silo. In RMP 38, Ahmes seems to have replaced 256/81 by 22/7, thereby eliminating 99% of the previous error.