Is there a formula to approximate $\pi$ in the form of $\dfrac{p}{q}$? Is there a formula which helps in approximation of $\pi$ as $\dfrac{p}{q}$ where $p,q \in \mathbb{Z}$?
I got this site though : [http://qin.laya.com/tech_projects_approxpi.html ] which shows the various fractions from $\pi \approx \frac{3}{2}$ to $\approx\frac{2646693125139304345}{842468587426513207}$
So is there any relation/formula/easy trick/anything which can help to find these fractions??
Thanks!!
 A: There are infinitely many ways to approximate pi with rational numbers, and there is a whole industry devoted to doing this to huge degrees of accuracy. Perhaps the simplest rational approximations to pi are found in its continued-fraction expansion. The first two are $3$ and $\frac{22}7$, and already the fourth, $\frac{355}{113}$, is accurate to six decimal places.
A: This series converges to $\pi$ from above, starting at $\frac{22}{7}$
$$\pi=\frac{22}{7}-\sum_{k=0}^\infty \frac{96 (160 k^2+422 k+405)}{(4 k+3) (4 k+5) (4 k+7) (4 k+9) (4 k+11) (4 k+13) (4 k+15) (4 k+17)}$$
A simpler one is
$$\pi=\frac{22}{7}-\sum_{k=1}^{\infty} \frac{240}{(4k+1)(4k+2)(4k+3)(4k+5)(4k+6)(4k+7)}$$
A series to prove $\frac{22}{7}-\pi>0$
A: Yes.  There are several.  The best know is the Leibniz formula:
$$1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \dots = \frac{\pi}{4}$$
This is an infinite series but just do the first few terms to get:
$$\pi = 4\frac{3\cdot5\cdot7 - 5\cdot7 + 3\cdot7 - 3\cdot5}{3\cdot5\cdot17} = \frac{304}{105} \approx 2.8952380952380\ldots$$
Okay, I never said it would be a good approximation, but each successive term gets closer. Add $4/9$ to that and we get $3.3396825396825\ldots$
EDIT
Here's a better one:
$$\frac{\pi}{4} = \sum_{n=0}^\infty\frac{2}{(4n+1)(4n + 3)}$$
So for the first three terms we get:
$$\pi = 8\left(\frac13 + 7\frac15 + 11\frac19 + 15\frac1{13}\right) \approx 3.017071817071817\ldots$$
A: The best way to obtain rational approximants of $\pi$ is by using continued fractions.
But the simple continued fraction for $\pi$ has no pattern - you will never be able to guess it without knowing the value of $\pi$ first.
So, you can use one of the better, regular continued fractions for $\pi$, like this one:
$$\pi=3+\dfrac{1}{6+\dfrac{3^2}{6+\dfrac{5^2}{6+...}}}$$
It converges much better than simple series, for example:
$$\pi=3+\dfrac{1}{6+\dfrac{3^2}{6+\dfrac{5^2}{6}}}=\frac{1321}{420}=3.14524$$
The next fraction (with $7^2$) looks nicer:
$$\frac{989}{315}=3.13968$$
See here for another three regular fractions for $\pi$.
You can also use infinite products instead of series, because you will immediately get a fraction at every step. Like Wallis product for example:
$$\prod^{\infty}_{n=1}\frac{2n}{2n-1}\frac{2n}{2n+1}=\frac{2}{1}\frac{2}{3}\frac{4}{3}\frac{4}{5}\frac{6}{5}\frac{6}{7}...$$
But it converges very slowly and gives huge fractions, for example:
$$\prod^{20}_{n=1}\frac{2n}{2n-1}\frac{2n}{2n+1}=\frac{151115727451828646838272}{48691767863540419643025}=3.10352$$
A: There is one made by Ramanujan in 1914 that aproximates $\frac{1}{\pi}$.
$$\frac{4}{\pi}=\frac{1}{882}\sum_{n=0}^{\infty}\frac{(-1)^{n}(4n)!}{(4^n n!)^4}\frac{1123+21460 n}{882^{2n}}$$
