You're reading: cp’s mathem-o-blog

I bought


I’m a big fan of novelty domain names: I once bought just so that could be my corresponding address when I submitted a paper. That domain has expired, but my love for one-shot novelty purchases has not!

To celebrate π day this year, I decided that it should be possible to type a little bit of π into the internet and be given the rest of it. You can have dots in domain names, so a domain like “” is possible. I only know π to two decimal places off the top of my head, so I was dismayed to learn that is being squatted.

After a bit of googling to find more digits of π (hey, this website will be really useful once I set it up!), I found the first decimal approximation which hasn’t already been registered:

Try going there now. It really exists!

I’ve set it up so you get an endlessly scrolling list of decimal digits of π, generated using my favourite unbounded spigot algorithm. I suppose you can consider this my entry in our π approximation challenge.

A good π day’s work.

Wolfram|Alpha can’t. But CP can!

For a while, I’ve been following this cool Twitter account that tweets questions Wolfram|Alpha can’t answer. The genius of it is that the questions all look like things that you could half-imagine the solution algorithm for at a glance, and many of them look like the kinds of questions Wolfram like to give as examples when they’re showing off how clever their system is.

Questions like this:

The answer to that is 278. How do I know that? I know that because I went on a little problem-solving binge answering the questions that Wolfram|Alpha can’t.

Watch out! I’m a blue whale and I’m about to land on you!


I don’t know why this question popped into my head, but it’s been sitting there for the past week and showing no signs of moving on.

Suppose an enemy of mine threw a friendly blue whale at me. Being a friendly whale, it makes the blue-whale-noise equivalent of “DUCK!” to warn me it’s coming.

How quickly does the whale need to be travelling for its warning to be useful?

Apparently I’m not a maths genius (or, On the Subject of Parcel Sizes)

This article on BBC News caught my eye because it has “maths” in the headline. Yes, I’m that easily pleased.

Somewhere in the middle, it says that myHermes requires the “volumetric area” of a parcel to be less than 225cm. That’s right: the “volumetric area” is neither a volume nor an area but a length. Anyway, the formula for volumetric area of a package with sides $a,b,c$, where $a \leq b \leq c$, is

\[ 2(a+b) + c \]

(Importantly, $a$ and $b$ are always the two shortest sides of the package)

So the constraint is

\[ 2(a+b) + c \leq 225 \]

In the next paragraph is the puzzling statement that the maximum allowable volume for a package is $82.68$ litres, or $82680$ cm3. How did they get that?

I decided to do some calculus of variations, or whatever it’s called.

The conclusions you can draw from this graph will SHOCK you

This is a blog post based on a Google+ post about a tweet. I can only hope that it will inspire a further flourishing of vines, instagrams and Yo!-s.

I saw this graph (originally from job stats site posted by a functional programming news site:


The accompanying tweet said

“More reasons to choice Functional Programming – #Clojure and #Haskell highest paying #engineer salaries!”.

Well, should I “choice” Haskell or Clojure, based on the evidence in this graph?

Integer Sequence Review – Sloane’s birthday edition!

The Online Encyclopedia of Integer Sequences contains over 200,000 sequences. It contains classics, curios, thousands of derivatives entered purely for completeness’s sake, short sequences whose completion would be a huge mathematical achievement, and some entries which are just downright silly.

For a lark, David and I have decided to review some of the Encyclopedia’s sequences. We’re rating sequences on four axes: Novelty, Aesthetics, Explicability and Completeness.

CP: It’s Neil Sloane’s 75th birthday today! As a special birthday gift to him, we’re going to review some integer sequences.

DC: His birthday is 10/10, that’s pretty cool.

CP: <some quick oeis> there’s a sequence with his birthdate in it! A214742 contains 10,10,39.

DC: We can’t review that. It’s terrible.

CP: I put it to you that you have just reviewed it.

DC: Shut up.

CP: Anyway, I’ve got some birthday sequences to look at.

DC: About cake?

CP: No.

Diaconis-Mosteller approximation to the Birthday problem function.

1, 23, 88, 187, 313, 459, 622, 797, 983, 1179, 1382, 1592, 1809, 2031, 2257, 2489, 2724, 2963, 3205, 3450, 3698, 3949, 4203, 4459, 4717, 4977, 5239, 5503, 5768, 6036, 6305, 6575, 6847, 7121, 7395, 7671, 7948, 8227, 8506, 8787, 9068, 9351