Chris Sangwin and I wrote a LaTeX package for drawing Hex boards and games called hexboard. It can produce diagrams like this.
First: why? Then: how do you use it?
Chris Sangwin and I wrote a LaTeX package for drawing Hex boards and games called hexboard. It can produce diagrams like this.
First: why? Then: how do you use it?
The next issue of the Carnival of Mathematics, rounding up blog posts from the months of December and January, is now online at Ganit Charcha.

The Carnival rounds up maths blog posts from all over the internet, including some from our own Aperiodical. See our Carnival of Mathematics page for more information.
This is the fourth in a series of guest posts by David Benjamin, exploring the secrets of Pascal’s Triangle.
If we highlight the multiples of any of the Natural numbers $\geq 2$ in Pascal’s triangle then they create a pattern of inverted triangles.

The images above are evocative of the Sierpinski sieve (also known as the Sierpinski gasket or Sierpinski’s triangle), a fractal described in 1915 by the Polish mathematician Waclaw Sierpiński (1882-1969).
Fractals are beautiful geometric shapes. Small, even down to (theoretically) infinitesimal areas of a fractal are identical to the entire shape. The Koch snowflake, generated geometrically by successive iterations on an equilateral triangle, is an example of a fractal. Julia sets and Mandelbrot sets are examples of fractals generated using recursion on complex functions. Many examples of fractals appear in nature, and the Polish-born French-American polymath Benoit Mandelbrot (1924-2010) suggested that fully developed turbulent flows are fractals.
It is a lovely surprise to discover that a simple fractal can be found inside Pascal’s triangle. It is achieved by considering all the numbers in the triangle modulo 2 – equivalent to colouring in only the multiples of 2, as in the first diagram at the top of the post. In this version, every odd number becomes $1$ and every even number becomes $0$, and by considering sufficiently many lines of the triangle, the Sierpinski pattern emerges.
If we consider the first 32 rows of the mod$(2)$ version of the triangle as binary numbers: $1, 11, 101, 1111, 10001,…$ and convert them into decimal numbers, we obtain the sequence:
\[1, 3, 5, 15, 17, 51, 85, 255, 257, 771, 1285, 3855, 4369, 13107, 21845, 65535, 65537, \]
\[196611, 327685, 983055, 1114129, 3342387, 5570645, 16711935, 16843009, \]
\[50529027, 84215045, 252645135, 286331153, 858993459, 1431655765, 4294967295\]
Interestingly, all members of this sequence are factors of the final term, $4294967295 = 2^{32} – 1$. Since this is one less than a power of two, it’s a Mersenne number. Why the first $31$ terms are all factors of the 32nd term is difficult to summarise here but there is a thread on StackExchange discussing what happens to the pattern after the $32nd$ term.
$4294967295$ has prime factorisation $3 \times 5 \times 17 \times 257 \times 65537$. These five prime factors are Fermat numbers – numbers of the form $2^{2^{n}}+1$ – in this case with $n = 0, 1, 2, 3$ and $4$. As of the time of writing these are the only known Fermat numbers which are also prime.
These patterns in the rows of the triangle are intriguing, and my own efforts to understand them have uncovered a few other interesting discoveries – notably, that while the 32nd term is not divisible by the 33rd, the 34th term is exactly 3 times the 33rd. The pairs of terms after that seem to alternate, as they do from the start of the sequence, between a non-integer ratio and a ratio of exactly 3, which I conjecture is a pattern that will continue.
$e$ and $\pi$ are two of the most used transcendental numbers. The Swiss mathematician Leonhard Euler (1707-1783) connected them with the most beautiful equation, called Euler’s identity:
\[e^{i\pi}+1=0\]
There are many approximations connecting $e$, $\pi$ and other irrational numbers to be found here.
In 2012 Harlan J. Brothers proved that
\[\displaystyle\lim_{n\to \infty} \frac{\ \displaystyle\frac{s_{n+1}}{s_n}\ }{\displaystyle\frac{s_n}{s_{n-1}}}=e\]
where $s_n$ is the product of the numbers on row $n$ of Pascal’s triangle. The proof can be found on Cut the Knot, part of the wonderful website of Dr Ron Knott.
In 2007 Jonas Castillo Toloza discovered a connection between $\pi$ and the reciprocals of the triangular numbers (which can be found on one of the diagonals of Pascal’s triangle) by proving
\[\pi= 2 + \frac{1}{1} + \frac{1}{3} – \frac{1}{6} – \frac{1}{10} + \frac{1}{15} + \frac{1}{21} – \frac{1}{28} – \frac{1}{36} + \frac{1}{45} + \frac{1}{55} – \ldots\]
Three proofs are given on Cut the Knot.
The infinite sum of the reciprocals of the Natural numbers is called the harmonic series, $H_n$, where
$H_n = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \frac{1}{7} + \frac{1}{8} \ldots$
The series is divergent, but it crawls its way towards infinity, and takes $15092688622113788323693563264538101449859497$ terms just to pass a total of $100$.
The harmonic series can be used to create a version of Pascal’s triangle – the series itself is placed along the two leading diagonals, and the entries are then related by each being the difference of the fraction to its left, and the one diagonally above it and to its left. For example, $\frac{1}{30} = \frac{1}{5}-\frac{1}{6}$.
Dividing the first term in the $n^{th}$ row by every other term in that row creates the $n^{th}$ row of Pascal’s triangle. The table below shows the calculations for the $5^{th}$ row:
| $\frac{1}{5}$ | $\frac{1}{20}$ | $\frac{1}{30}$ | $\frac{1}{20}$ | $\frac{1}{5}$ |
| $\frac{1}{5}\div \frac{1}{5} =1$ | $\frac{1}{5}\div \frac{1}{20} =4$ | $\frac{1}{5}\div \frac{1}{30} =6$ | $\frac{1}{5}\div \frac{1}{20} =4$ | $\frac{1}{5}\div \frac{1}{5} =1$ |
In our next post, we’ll talk about probability and statistics in Pascal’s triangle, and consider some of Pascal’s other contributions.
We invited mathematician and wordplay fan Ali Lloyd to share his thoughts on hit internet word game phenomenon Wordle. If you’re not familiar with the game, we recommend you go and have a play first.

When I first saw Wordle I said what I saw many other people subsequently say: “Oh, so it’s a bit like Mastermind but with words? That’s a neat idea”.
I’ve made a little game.

This is the third in a series of guest posts by David Benjamin, exploring the secrets of Pascal’s Triangle.
Leonardo Pisano (1170-1250), now universally known as Fibonacci, was born in Pisa, Italy, where he was also living at the time of his death. He was educated in north Africa as his father worked there, representing the merchants of the Republic of Pisa when they were trading in Bugia, now called Béjaïa, a Mediterranean port in Algeria.

Fibonacci returned to Pisa in about 1200 where he wrote a number of important books. His book Liber abaci introduced the Hindu-Arabic place-valued decimal system and the Arabic numerals we now use. Books and any copies had to be handwritten, as it predated the printing press. Fibonacci is now mostly remembered for introducing the Fibonacci numbers and sequence which appeared in the third section of Liber abaci as a problem about rabbits:
A certain man put a pair of rabbits in a place surrounded on all sides by a wall. How many pairs of rabbits can be produced from that pair in a year if it is supposed that every month each pair begets a new pair which from the second month on becomes productive?
The resulting sequence is $1, 1, 2, 3, 5, 8, 13, 21, 34, 55…$ (although Fibonacci did not include the first term in the book).
The ratio of successive terms converges on the Golden Ratio, $\phi$.
$\phi = \displaystyle\frac{1 + \sqrt5}{2} \approx 1.618033988749. . .$
$\phi$ is an irrational number and is the positive solution of the quadratic equation $x^2 – x – 1 = 0$ Hence, since $\phi$ is the root of an integer polynomial, it is not transcendental, unlike $\pi$.
\[ \frac{1}{1} = 1 \qquad \frac{2}{1} = 2 \qquad \frac{3}{2} = 1.5 \qquad \frac{5}{3} = 1.666 \ldots \qquad \frac{8}{5} = 1.6\]
\[ \frac{13}{8} = 1.625 \qquad \frac{21}{13} \approx 1.615384 \qquad \frac{34}{21} \approx 1.619047 \qquad \frac{55}{34} \approx 1.617647 \qquad \ldots \]
Indeed, convergence to $\phi$ remains true if we start with any pair of Natural numbers and follow the same pattern where any term after the second is the sum of the previous two terms.
| Terms | Ratio |
| 3 | 2.33333… |
| 7 | 1.428571… |
| 10 | 1.7 |
| 17 | 1.58823… |
| 27 | 1.62962… |
| 44 | 1.61363… |
| 71 | 1.61971… |
| 115 | 1.61739… |
| 186 | 1.61827… |
| 301 | 1.61794… |
| 487 | 1.61806… |
| 788 | 1.61802… |
| 1275 | 1.61803… |
| Terms | Ratio |
| 5 | 0.6 |
| 3 | 2.66666… |
| 8 | 1.375 |
| 11 | 1.72727… |
| 19 | 1.57894… |
| 30 | 1.63333… |
| 49 | 1.61224… |
| 79 | 1.62025… |
| 128 | 1.61718… |
| 207 | 1.61835… |
| 335 | 1.61791… |
| 542 | 1.61808… |
| 877 | 1.61801… |
| Terms | Ratio |
| 2 | 0.5 |
| 1 | 3 |
| 3 | 1.33333… |
| 4 | 1.75 |
| 7 | 1.57142… |
| 11 | 1.36363… |
| 18 | 1.61111… |
| 29 | 1.62068… |
| 47 | 1.61702… |
| 76 | 1.61842… |
| 123 | 1.61788… |
| 199 | 1.61809… |
| 322 | 1.61801… |
In Liber abaci, Fibonacci included other numeracy problems – on perfect numbers, the Chinese remainder theorem and on the sum of arithmetic and geometric series. He wrote a book on geometry, Practica geometriae, and perhaps his most impressive work was Liber quadratorum in which he included methods for finding Pythagorean triples. But it is for his sequence for which he is mainly remembered.
Finding out that the Fibonacci sequence can be found in Pascal’s triangle was a delight for me and I find it hard to think it is just a coincidence. To view Fibonacci’s sequence we can display the triangle as a right-angled triangle.
My interest in mathematics began when the film Donald Duck in Mathmagic Land was shown to our class in my first year at secondary school in Burnage, Manchester, England and as a teacher of mathematics I showed it in the lesson before Christmas to many year 7 groups.
The film illustrates how the Golden Rectangle has been used by artists and architects throughout history as well as connections between the golden ratio and music. The film mimics some of the novel Alice in Wonderland by Lewis Carroll, the pseudonym of the mathematician Charles Lutwidge Dodgson.
Further connections between the golden ratio and music can be found here and between the ratio and a Stradivarius violin here:
The Lady Blunt shown above shows the measurements connected to the golden ratio:
\[ \frac{a_1 +a_2}{a_2}=\frac{a_2}{a_1}=\frac{b_2}{b_1}=\frac{b_2}{c_2}=\frac{c_2}{c_1}=\phi \]
Below is a geometric interpretation of the golden ratio and the golden rectangle:

The French mathematician François Édouard Anatole Lucas (1842-1891) served as an artillery officer in the Franco-Prussian War, and subsequently became professor of mathematics at the Lycée Saint Louis and then professor of mathematics at the Lycée Charlemagne, both in Paris. Lucas did a lot of work on number theory and was particularly interested in the Fibonacci sequence and devised the test for Mersenne primes which is still used today.
Lucas died of erysipelas (a bacterial skin infection) a few days after a freak accident. He was at a banquet when a fragment of a dropped plate flew up and cut his cheek.
His sequence, the Lucas sequence, begins with the pair of numbers $2$ and $1$ and its terms are generated in the same way as for the Fibonacci sequence.
$2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521…$
There are a number of connections between the Fibonacci sequence and the Lucas sequence. The $3^{rd}$ Lucas number is the sum of the $1^{st}$ and $3^{rd}$ Fibonacci number, the $4^{th}$ is the sum of the $2^{nd}$ and $4^{th}$, the $5^{th}$ is the sum of the $3^{rd}$ and $5^{th}$, the $6^{th}$ is the sum of the $4^{th}$ and $6^{th}$,…

Division of the Fibonacci terms $2n$ and $n$ beginning with the $2^{nd}$ term yields the Lucas terms
$2^{nd} \div 1^{st} = 1 \div 1 = 1$
$4^{th} \div 2^{nd} = 3 \div 1 = 3$
$6^{th} \div 3^{rd} = 8 \div 2 = 4$
$8^{th} \div 4^{th} = 21 \div 3 = 7$
$10^{th} \div 5^{th} = 55 \div 5 = 11$,..
With some manipulation of Pascal’s triangle and some basic arithmetic, we can find the Lucas numbers in the triangle. We begin by setting out the triangle as below and sum the columns to obtain the Fibonacci sequence
We now multiply each Pascal number by its column number and divide by its row number, starting with row $1$ column $1$ and then sum the new entries in each column. The first few calculations are shown below:
Generally, $\displaystyle\frac{\phi^n -(\frac{1}{\phi})^n}{\phi -(\frac{1}{\phi})}$ is the formula for the $n^{th}$ Fibonacci number, $\displaystyle\frac{\phi^n +(\frac{1}{\phi})^n}{\phi +(\frac{1}{\phi})}$ is the formula for the $n^{th}$ Lucas number and $\phi^n =\displaystyle \frac{L_n+ \sqrt5 \times F_n}{2}$, where $L_n$ and $F_n$ represent the $n^{th}$ Lucas and Fibonacci numbers respectively.
In the next part, we’ll consider some more connections between the triangle and particular numbers, and types of numbers.
In this series of posts, Katie investigates simple mathematical concepts using the Google Sheets spreadsheet app on her phone. If you have a simple maths trick, pattern or concept you’d like to see illustrated in this series, please get in touch.
Since apparently I’m now a maven for interesting fun things built using Google Sheets, someone tagged me in to suggest I might like to see this Truchet Tiling Generator, built in Google Sheets using images generated in Google Drawing.