# Sleeping Cyborg

Jonathan David Page talks about whatever he happens to be thinking about. Sometimes other people join in.

A collection of cool people and projects.

## Look ma, I’m a writer! & my glorious return to blogging.

by on 1 November 2013
in , , , , , , , , , , , ,

Regarding to the "posting links regularly" thing I mentioned in the last post, I need to make a remark:

HAHAHAHAHAHAHAHAHAHAHAHAHAHA

hahahaha

wheeze

hahaha. ha.

Okay, now that that's over with, I can get down to business.

## Approximating Pi Redux

by on 20 December 2012
in , ,

No, it isn’t Pi Day, or anything resembling it. I was editing some stuff, and I noticed the original “Approximating Pi” article. I’d been meaning to rewrite the code since I learned about continued fractions, and since I didn’t have anything better to do, This is a lie. I do, in fact, have a number of things to do that various people might define as “better”, but I didn’t feel like doing any of them. I felt like sitting around in my bathrobe and writing Python. I decided to do so. A detailed explanation follows the source code, since this is less mathematically facile than the previous version.

## Approximating Pi

by on 23 July 2012
in , ,

You didn't get a post for July 22, so here's some Python which finds approximations for pi.

Update 20 Dec 2012: See also the revised version utilizing continued fractions.

## Pi Day!

by on 14 March 2012
in ,

In honor of everyone's favourite mathematical constant, March 14, or 3/14 is Pi Day. Hooray!

Next up: Tau Day on June 28th, or 6/28. After that we get "European Pi Approximation Day" on July 22nd, or 22/7. Such fun we can look forward to!

## Proof of the Square Root of 2’s Irrationality

by on 9 February 2012
in

Ever since I first ran into this proof a few years ago, I've always thought it rather elegant. It came up (read: I brought it up) while studying for a proofs test, so I thought I would post it here. It serves as a decent test of whether the mathematics typesetting system on here is working properly.

### Claim

$$\sqrt 2$$ is irrational.

Suppose $$\sqrt 2$$ is a rational number. This means that it can be expressed as an irreducible fraction $$\frac{p}{q}$$ where both $$p$$ and $$q$$ are integers. So $$\sqrt{2} = \frac{p}{q}$$, thus $$2 = \left(\frac{p}{q}\right)^2$$, thus $$2 = \frac{p^2}{q^2}$$, so $$2q^2 = p^2$$. Since $$p^2$$ has a factor of 2, $$p^2$$ is even, and therefore $$p$$ is also even, meaning that $$p = 2k$$ where $$k$$ is an integer. Substituting, $$2q^2 = (2k)^2$$, thus $$2q^2 = 4k^2$$, thus $$q^2 = 2k^2$$. Since $$q^2$$ has a factor of 2, it is also even, so $$q$$ is even. Therefore, $$p$$ and $$q$$ are both even, and so share a common factor of 2. But we assumed that $$\frac{p}{q}$$ was irreducible. This is a contradiction. Therefore $$\sqrt 2$$ is irrational. □

## bearjcc asked: What number do you get when you call the Ackermann function with Graham’s number as arguments?

by on 28 April 2011
in ,
The Ackermann function is a mathematical function that returns really really large numbers. For example, $$A(4,2)$$ is an integer with over 19,700 decimal digits.
As you can imagine, $$A(g_{64}, g_{64})$$ is quite a large number.
PS-- I'll answer the $$e^{\pi i}$$ question soon, I want to type out a proper explanation for that.