# Mathspp Blog

### A blog dedicated to mathematics and programming!

This blog has a really interesting assortment of articles on mathematics and programming. You can use the tags to your right to find topics that interest you, or you may want to have a look at

You can also subscribe to the blog newsletter.

##### Problem #024 - hats in a line

Some people are standing quiet in a line, each person with a hat that has one of two colours. How many people can guess their colour correctly?

##### Filling your Pokédex - a probabilistic outlook

Join me in this blog post for Pokéfans and mathematicians alike. Together we'll find out how long it would take to fill your complete Pokédex by only performing random trades.

##### Implementing an interpreter in 14 lines of Python.

In this blog post I'll show you how you can write a full interpreter for the brainf*ck programming language in just 14 lines of Python. Be prepared, however, to see some unconventional Python code!

##### Problem #023 - guess the polynomial

In this problem you have to devise a strategy to beat the computer in a "guess the polynomial" game.

##### Twitter proof: consecutive integers are coprime

Let's prove that if $$k$$ is an integer, then $$\gcd(k, k+1) = 1$$. That is, any two consecutive integers are coprime.

##### Twitter proof: maximising the product with a fixed sum

Let's prove that if you want to maximise $$ab$$ with $$a + b$$ equal to a constant value $$k$$, then you want $$a = b = \frac{k}{2}$$.

##### Problem #022 - coprimes in the crowd

This simple problem is an example of a very interesting phenomenon: if you have a large enough "universe" to consider, even randomly picked parts exhibit structured properties.