TITLE: How to convert $\pi$ to base 16?
QUESTION [17 upvotes]: According to this Wikipedia article $\pi$ is approximately 3.243F in base 16 (i.e. hexadecimal).
Can someone explain this?  (Note: I understand how to convert an integer to base 16)
Thanks

REPLY [13 votes]: Note that:
$$10000\pi=31415.92653\dots$$
which means that the decimal version of $\pi$ begins $3.1415\dots$.
Similarly:
$$16^4\pi=205887.46145\dots$$
Since $205887$ is $3243F$ in hexadecimal, the hexadecimal version begins $3.243F\dots$.

REPLY [13 votes]: For the particular base of $16$, there is this remarkable formula:
$$\pi=\sum_{n=0}^\infty \left(\frac{4}{8n+1}-\frac{2}{8n+4}-\frac{1}{8n+5}-\frac{1}{8n+6}\right)\frac{1}{16^n}$$
It allows the computation of any base 16 digit of $\pi$ without the need to compute all the preceding digits.
The discovery of this formula by Bailey, Borwein and Plouffe in 1995 came as a big surprise, as it was conjectured that no such formula can exist.