# Approximating Pi (Happy Pi Day)

Posted in Mathematics

## Favorite Pi Approximations

What's your favorite $$\pi$$ approximation?

Some of my favorite approximations of $$\pi$$ come from Ramanujan-Sato series. These are mathematical series that generalize from a remarkable formula for $$\pi$$ given by Srinivasa Ramanujan, an Indian mathematician:

$$\pi^{-1} = \dfrac{\sqrt{8}}{99^2} \sum_{k \geq 0} \dfrac{ (4k)! }{ \left( 4^k k! \right)^4 } \dfrac{ 1103 + 26390k }{ 99^{4k} }$$

This completely novel formula opened up new branches of mathematics and provided a whole new class of $$\pi$$ approximations (the Ramanujan-Sato series) and approximations that are extremely accurate, making them very useful for computer applications. (Each term of …

# Euler's Theorem, the Totient Function, and Calculating Totients By Hand

Posted in Mathematics

## Introduction

Today we're going to delve into a little bit of number theory.

In number theory, we are usually dealing with modular arithmetic - expressions of the form:

$$a \equiv b \mod m$$

or

$$f(x) \equiv 0 \mod m$$

The mod indicates we're doing modular arithmetic, which is (formally) an algebraic system called a ring, which consists of the integers 0 through m.

An analogy to modular arithmetic is the way that the sine and cosine function "wrap around," and

 \sin \left …

# Computing Square Roots: Part 2: Using Continued Fractions

Posted in Mathematics

## Continued Fractions

Let's start part 2 of our discussion of computing square roots by talking about continued fractions. When we first learn mathematics, we learn to count in the base 10 system: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. We can construct representations of all of the integers using these 10 digits, by arranging them in a different order. So, for example, saying 125 is equivalent to saying …

# Computing Square Roots: Part 1: Using Newton's Method

Posted in Mathematics

Suppose we have a function $$f(x)$$ and we want to compute values of $$x$$ for which $$f(x)=0$$. These values of $$x$$ are called the roots of $$f(x)$$.