If you do some of these, you might spot what’s funny about them. For example.

\[ \Large \begin{bmatrix}

\color{navy}{4} & \color{navy}{8}\\

\color{navy}{2} & \color{navy}{3}

\end{bmatrix} \begin{bmatrix}

\underline{\color{blue}{8}} & \underline{\color{blue}{8}}\\

\underline{\color{blue}{2}} & \underline{\color{blue}{7}}

\end{bmatrix} = \begin{bmatrix}

\color{navy}{4}\underline{\color{blue}{8}} & \color{navy}{8}\underline{\color{blue}{8}}\\

\color{navy}{2}\underline{\color{blue}{2}} & \color{navy}{3}\underline{\color{blue}{7}}

\end{bmatrix} \]

That is, the answer to each question can be made by treating the element in the first matrix as the first digit and the corresponding element in the second matrix as the second digit in the answer element. This is not how matrix multiplication works, and ought to be funny if I hadn’t totally over-explained the joke!

I saw one of these in a meme that Katie posted in the Finite Group chat and it got me thinking about how these work.

If we set up the matrices like this

\[ \begin{bmatrix}

a & b\\

c & d

\end{bmatrix} \begin{bmatrix}

e & f\\

g & h

\end{bmatrix} = \begin{bmatrix}

10a+e & 10b+f\\

10c+g & 10d+h

\end{bmatrix} \]

Then we establish four equations with eight unknowns.

\[ \begin{align*}

ae + bg &= 10a+e\\

af+bh &= 10b+f\\

ce+dg &= 10c+g\\

cf+dh &= 10d+h

\end{align*}\]

Since there are more unknowns than equations, these don’t have a single solution. What I wanted was to find integer solutions with all values single-digits. I wrote some Python code to find these. I removed some that look overly symmetrical – either the rows of the matrix are identical, or the same matrix is repeated. This left 73 items.

From these 73 items, I wrote a second Python script that picks 20 of them at random and builds these into a LaTeX worksheet. For the Mastodon post I reformatted this into the shape and size that I thought would display better on social media, and added in one of the squared matrices for an extra hint something weird is up, hoping people might notice this isn’t just a boring post about matrix multiplication practice!

You can view these scripts and associated files on GitHub.

]]>\[ f(x) = x^2 + x + 41\text{.} \]

Using this, \(f(0)=41\), which is prime. \(f(1)=43\), which is also prime. \(f(2)=47\) is another prime. In fact this sequence of primes continues for an incredible forty integer inputs until \(f(40)=41^2\). It might generate more primes for higher inputs, but what’s interesting here is the uninterrupted sequence of forty primes.

This got me wondering. Clearly \(f(0)\) is prime because 41 is prime, so that much will work for any function

\[ f(x) = x^2 + x + p \]

for prime \(p\), since \(f(0)=0^2+0+p=p\). Are there other values of \(p\) that generate a sequence of primes? Are there any values of \(p\) that generate longer sequences of primes?

I wrote some code to investigate this. Lately, I’ve taken to writing C++ when I need a bit of code, for practice, so I wrote this in C++.

I figured the cases where \(f(0)\) is prime but \(f(1)\) isn’t weren’t that interesting, since \(f(0)\) is trivially prime. In fact, \(f(x)=x g(x)+p=p\) when \(x=0\) for any prime \(p\), but saying so doesn’t seem worth the effort.

So I kept track of the primes \(p\) whose functions \(f(x)=x^2+x+p\) generate more than one prime, and the lengths of the sequences of primes generated by each of these. This produced a pair of integer sequences.

I put the primes that work into the OEIS and saw that I had generated a list of the smaller twin in each pair of twin primes. I was momentarily spooked by this, until I realised it was obvious. Since \(f(0)=p\) and \(f(1)=1^2+1+p=p+2\), any prime this works for will generate at least a twin prime pair \(p,p+2\).

What about the lengths of the sequences of consecutive primes generated? The table below shows the sequences of consecutive primes generated for small values of \(p\). Most primes that generate a sequence produce just two, and \(p=41\) definitely stands out by generating forty.

\(p\) | \(f(x)\) | Primes generated | Number of consecutive primes generated |

3 | \(x^2+x+3\) | 3, 5 | 2 |

5 | \(x^2+x+5\) | 5, 7, 11, 17 | 4 |

11 | \(x^2+x+11\) | 11, 13, 17, 23, 31, 41, 53, 67, 83, 101 | 10 |

17 | \(x^2+x+17\) | 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257 | 16 |

29 | \(x^2+x+29\) | 29, 31 | 2 |

I was pleased to see this sequence of lengths of primes generated was not in the OEIS. So I submitted it, and it is now, along with the code I wrote. (I discovered along the way that the version where sequences of length one are included was already in the database.)

Anyway, I amused myself by having some C++ code published, and by citing Euler in a mathematical work. Enjoy: A371896.

]]>You know how loads of things in maths are named for the wrong person? In 1996, a fun quiz appeared in *The Mathematical Gazette* based on history of maths misconceptions. It contained a series of questions where the obvious answer is not correct, such as “Who discovered Cramer’s rule?”, “Did Pascal discover the Pascal triangle?” and “Who first published Simpson’s rule?”

I was looking for a demo to show my students that generative AI programs are not producing accurate knowledge when I thought of this quiz. I put its questions to ChatGPT to see how it did. The point of the exercise is that these systems just parrot back words from their training data without any concept of truth, so if the training data is full of misconceptions, so too will be the responses. But these are misconceptions from the 1990s, so how much influence will they have on the responses?

You can see how ChatGPT did when I gave it the quiz in a short, free to read, open access paper in the *British Journal for the History of Mathematics*: Generative AI and accuracy in the history of mathematics.

For example, 13, 3541 and 9999713 are prime. Reversing their digits we get the primes 31, 1453 and 3179999, so these are all emirps. It doesn’t work for all primes – for example, 19 is prime, but 91 is \(7 \times 13 \).

In the livestream chat the concept of primemirp emerged. This would be a concatenation of a prime with its emirp. There’s a niggle here: just like in the word ‘primemirp’ the ‘e’ is both the end of ‘prime’ and the start of ’emirp’, so too in the number the middle digit is end of the prime and the start of its emirp.

Why? Say the digits of a prime number are \( a_1 a_2 \dots a_n \), and its reversal \( a_n \dots a_2 a_1 \) is also a prime. Then the straight concatenation would be \( a_1 a_2 \dots a_n a_n \dots a_2 a_1 \). Each number \(a_i\) is in an even numbered place and an odd numbered place. Now, since

\[ 10^k \pmod{11} = \begin{cases}

10, & \text{if } k \text{ is even;}\\

1, & \text{otherwise,}

\end{cases} \]

it follows that each \(a_i \) contributes a multiple of eleven to the concatenation. A mismatched central digit breaks this pattern, allowing for the possibility of a prime.

I wrote some code to search for primemirps by finding primes, reversing them and checking whether they were emirps, then concatenating them and checking the concatenation. I found a few! Then I did what is perfectly natural to do when a sequence of integers appears in front of you – I put it into the OEIS search box.

Imagine my surprise to learn that the concept exists and is already included in the OEIS! It was added by Patrick De Geest in February 2000, based on an idea from G. L. Honaker, Jr. But there was no program code to find these primes and only the first 32 examples were given. I edited the entry to include a Python program to search for primemirps and added entries up to the 8,668th, which I believe is all primemirps where the underlying prime is less than ten million. My edits to the entry just went live at A054218: Palindromic primes of the form ‘primemirp’.

The 8,668th primemirp is 9,999,713,179,999.

]]>Fast forward to 2023, and social media is collapsing. Some people have chosen a direction and are marching off towards Mastodon, Bluesky, Threads, or a number of other platforms. Some people are trying to keep up with multiple of these, but feeling spread too thin and wondering if it’s worth the effort (ask me how I know!). But many people are taking the opportunity to step back and think again. People are rethinking whether they want to conduct their online social lives in public. There is a surge in private communities, things like WhatsApp groups, Slack channels and Discord rooms. These have the advantage that you aren’t part of the ‘engagement’-driven content push, but they have disadvantages too – you have to know the right people to get into the group.

Meanwhile, *wouldn’t* it be nice if there was a place where maths people could hang out and create cool maths things?

So we’re creating it. We’re calling it **The Finite Group** (who doesn’t love a punny maths name?). “We” is Katie Steckles, Sophie Maclean, Matthew Scroggs and me. It’s going to be a maths community that gets together to share and create cool maths things, that supports creators to do their work within the group and on the wider internet.

It’s semi-public, in that anyone can find it and join, but there’s a barrier to entry which will hopefully mean it collects people who are on board with the ethos of the group. We hope to create a friendly and supportive community of people who are interested in maths and want to play and explore together.

At the start, there will be two main activities.

- A supportive online chat community focused on maths and related topics. We’re running this on Discord, a chat platform designed for small communities to get together and hang out. People can chat and post things they find interesting – puzzles, jokes and memes, links to maths papers, written content or videos, or anything else they think people may find interesting – as well as reply and react to what others have shared. You can edit typos in your posts. If there is interest in a particular topic, we can create a side channel to discuss it. Discord seems to have a lot of potential as a tool to support a friendly community getting together. We hope this will be a place to build a community and make friends.

It looks basically like this, where I’ve shared a link, edited a typo (flags, not flag, Peter!), and two people have reacted using a Rubik’s cube custom emoji. Like you do.

- One of the ways that our friendly community will get together is through online events. Roughly monthly, we’ll get together live. These will be collaborative and exploratory, your opportunity to watch the hosts chew over mathematical ideas and pitch in with your own. Our idea is that we could have one of us ‘explaining’ something, with others joining in the conversation. It won’t be a formal lecture – it’ll be chatty, with plenty of opportunity for you to pitch in with questions and ideas about the topic.

Perhaps it’ll be Katie helping me get my head around the maths behind a card trick, Sophie explaining the maths she used as a trader, or Scroggs talking through the maths behind his latest puzzle. We’ll expect a level of maths knowledge equivalent to about high school/college level, and if anything is under-explained there’ll be the opportunity to ask questions. We will attempt to record the video so community members who miss it live can watch back for a short time afterwards.

Depending on your tastes, you can emphasise one or the other, whether it’s a friendly online chat community that gets together for video chats, or a series of online events supported by a chat group. The precise scale and scope are to be determined. It’ll depend who joins and what they want – it’s a community, after all. And how many people join will determine the resource we have available to play with. We’d love to increase the number of activities and broaden the range of creators we can support, but it depends how many people are willing to chip in to be part of it.

So join The Finite Group via Patreon from £4/month to be a part of our friendly mathematical community and support mathematical creators in our live monthly-ish video chats, as well as mathematical projects, events and content we’ve created elsewhere on the internet.

If you’re already interested, that’s great – you can sign up straight away. Regardless, we’d like to invite you to join us for our (free) first livestream, which will be on **Tuesday 17th October from 6-7pm BST**, and will be free to access for anyone, in the hope that people will enjoy it and want to join our community.

My son and I visited The Mathematikum in Giessen. This is well worth a visit, we did it as a day trip by train from holiday in Frankfurt, which worked well because the museum is close to the railway station. The Mathematikum specialises in ‘hands on, minds on’ interactive activities, and we spent about 5 hours exploring the four floors. I enjoyed the open-access article The Mathematikum in Giessen by Martin Buhmann, who was kind enough to meet us and show us around.

There are some Mathematikum-made exhibits at MathsCity Leeds. I took some pictures of exhibits we had enjoyed that aren’t (to the best of my memory) available in Leeds. Here they are, in no particular order.

My son and some other kids enjoyed playing with this, where you had to balance discs on a spinning circle. If you balance it correctly, the disc spins round with the circle – for a while!

My son played with this for a long time and it seems nice. You use the shapes to make shadows of the right size and shape, tilting to make e.g. the circle shape cast an oval pattern.

He enjoyed making a Penrose tiling on a table they have at MathsCity too, and I was pleased to see the ‘hat’ tile was already featured in a small exhibit.

He tells me he enjoyed the Pythagorean Theorem demonstrations.

This one was very nice and clear – the red and yellow squares are blue on the back, so you swap the area between the blue hypotenuse and the red and yellow sides.

The balance scale was cute – you weigh the objects on the sides to illustrate the theorem. I wonder how much these help understanding the theorem for people who don’t already get it, but it was certainly a memorable illustration.

He spent a long time rolling back and forth on these!

We both enjoyed this, which demonstrates the difference between a globe and a projection by seeing which countries a line passes through on its way between two points and noticing these are different on the globe from the map.

We also both enjoyed the catenary curve, which you build laying down then tilt upright using a hinged board.

This was a really nice demo of the Mobius strip and he enjoyed driving the cars round it – starting on ‘opposite’ sides and then they crash.

He liked the ‘one in a million’ demo and it seemed nice. You spin a cylinder of a million little balls, one of which is a different colour. Apparently people tend to think of ‘needle in a haystack’ and guess the odd one can’t be found, but actually the one different-coloured ball stands out very clearly.

We enjoyed producing the stages of the Koch snowflake – starting with the red triangle pins, then moving the string to first the yellow, then the blue pins to illustrate the fractal forming.

There was loads more we enjoyed. I’ve tried to focus on things we hadn’t seen in Leeds that he particularly enjoyed playing with on the day, and that I had pictures of.

]]>Bouton gives a list of “the 35 safe combinations all of whose piles are less than 16”, working in three-heap Nim. Naturally it seemed sensible to check these, so I wrote a bit of Python code to do this. Bouton’s list is good. I realised I could easily adapt my code to find out how many \(\mathcal{P}\) positions there are for three-heap Nim games with other maximum heap sizes: 1, 2, 3, and so on.

And, having generated a sequence of integers, I naturally looked to see if it was in the OEIS. This is sometimes a good way to discover that your sequence of numbers is also found in some unexpected places. It wasn’t there! So I submitted it, and I just got the exciting email “N. J. A. Sloane published your changes”. So I present A363166: “*Bouton numbers: a(n) is the number of P positions in games of Nim with three nonzero heaps each containing at most n sticks*”.

This is my first OEIS submission, so it’s all very pleasing, even if I’m submitting a ‘new’ sequence inspired by a 1901 paper!

]]>I wrote some Python code that runs all 45,057,474 possible draws against these 27 tickets.

All draws had between 1 and 9 winning tickets from the set (crucially, none had zero!). Obviously for 27 of the draws one of the winning tickets matched all six numbers, but about 75% of the draws saw a maximum of 2 balls matched by the winning tickets, and a further 23.5% had at most 3 balls matched. This means almost 99% of the time the 27 tickets match just two or three balls, earning prizes which may not exceed the cost of the 27 tickets! (I recommend reading Remark 1.2 in the paper.)

More findings and my code on GitHub.

Update 1: Tom Briggs asked what’s the expected return for buying these 27 tickets. I think the average return is about £20, which is a £34 loss (and of course this is an average from a set of numbers that includes some big wins). Assumptions and details in the GitHub.

Update 2: Matt Parker prompted me to investigate what percentage of draws end in profit. Even though 99% of the time the tickets match just two or three balls, if more than one ticket matches three balls that would still be a small profit. In fact, a profit is returned in 5% of draws, though as noted above the expected return is a loss. Matt included this result in a fun video about the 27 tickets. Again, assumptions and details in the GitHub.

]]>He was putting his shoes on for school and his mum remarked how big his new trainers are, that they are almost as big as hers. Next he was comparing them by holding them against other shoes on the shoe rack. My feet are much bigger.

His mum joked that my feet are too big, and if I’d just consent to losing a few toes we could fit me in a smaller shoe. For some reason, this made him think about a character in *One Fish Two One Fish Two Fish Red Fish Blue Fish* by Dr. Seuss who has eleven fingers in an uneven split, but he couldn’t remember the split. It’s a brilliant entry in the book because it isn’t ten and it isn’t evenly split, encouraging some ‘out of the box’ thinking for the age range it’s aimed at. I don’t think he’s read this book for a while, but he’s brought it up before – it’s his go-to item for an unconventional number of fingers or toes.

I said “I don’t think it’s as simple as 5-6”. His mum said “what else could it be?” He said “ten and one”. She said “what are all the options for what it could be? There you are, that’s your topic for your walk to school!”

As I was opening the door he quickly rattled off “two and nine, three and eight…” I said “I don’t think this is going to last the whole walk!” and she shouted after us “do 15 next!”

He quickly got to “five and six” then said “and then it’s six and five, and it goes on from there”. He explained that he did it by following the pattern of increasing one number and decreasing the other. We talked about how there was a symmetry there.

I said that splitting a number into numbers that add up to it is a topic called partitions. He said “I know”. I said “is that a term you use at school?” He said “not often”. I don’t know if ‘partition’ is actual primary school terminology or something he’s picked up in a book.

I spoke about how you can think about dividing numbers into more than two parts, and thinking about how many parts you can partition a number into is a hard problem as the numbers get bigger. I told him someone who had been really good at this problem was Ramanujan. He has a book about Ramanujan so was interested to hear this – he said “that makes sense because he’s the boy who dreamed about infinity”.

He told me that in the book Ramanujan splits a fruit, perhaps a mango, into parts and then puts it back together. He said “Ah! Fractions are partitions!”

Then he said “the easiest way to split 11 into numbers is if you had an alien with eleven arms and each arm had one finger, then it would be one plus one plus one plus one plus one plus one plus one plus one plus one plus one plus one”. At this point we were passing the gate of a secondary school and the teacher waiting there to sign in late arrivals gave a chuckle and caught my eye with a grin.

He thought for a minute then announced that he couldn’t split eleven into twos. I said he could do some twos and some ones, so we enumerated these for a bit. Then I said “and that’s just the ways using only ones and twos. How many ways do you think there are in total?” He laughed and said “loads!”

At this point we saw a friend of his who was in the school newsletter for being good at speaking French, and he starting talking about her. So ended our journey from comparing shoe sizes to chopping off my toes to partition numbers!

All this happened within about five minutes. It’s fun to let his mind wander, with the occasional prompt, and see what it sparks. I think no amount of planning on my part could have got us from comparing the sizes of shoes to partition numbers so quickly!

]]>