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!

]]>I joined Twitter in February 2009, having considered doing so for about a year. I wrote on this blog at the time that “Now it is really taking off I have decided to give it a go for a trial period”. I didn’t really define the trial or what I wanted out of it, but I sent my first tweet and stuck with it.

Before and since, I didn’t sustain various other social media. Some I tried and didn’t stick with, for example I was on Facebook for five minutes a dozen years ago and it irritated me, plus I played around with writing an app for it and realised quite how much data app developers had access to and didn’t like it. Some I am on but don’t much use, like LinkedIn.

For some reason, Twitter stuck. I think back then I liked its low-fi, immediate nature – a focus on ‘What are you doing?’ and the necessity to post short messages. There were and are still a nice community of mathsy people posting interesting things.

I feel like I’ve been doing less with Twitter over time. I decided to interrogate this hypothesis, so this morning I plotted the number of tweets I’ve sent each month.

It seems my interest (in terms of posting messages) peaked in 2012, and following a little bump in the first year of the pandemic has dropped to its lowest level in 2021-22. The number of tweets peaked at around 380 per month in 2012, has mostly been in the 100s per month but has dropped to 70-80 per month since late 2020.

I can’t really explain why this is, but definitely changes to the system over time have made harder to engage with. For a long time I’ve read tweets through some code I wrote to pull via the API a set of tweets – specific people, certain search terms and a random sampling from my wider pool of followers. So I’ve never been bothered as a reader by its algorithmic shenanigans, but I am aware of some of the impacts it has. Also I haven’t experienced some of the horror that others have. For whatever reason, it seems I still read Twitter, but I engage less than I once did.

Following the Elon Musk Twitter purchase, it seems there is suddenly a lot of interest in alternatives like Mastodon.

I joined Mastodon in 2017 when Christian Lawson-Perfect (who runs The Aperiodical) and Colin Wright set up Mathstodon. I liked the idea of an independent social network that renders maths (via MathJax, like The Aperiodical). But it didn’t stick. I suppose it’s hard to do both at once and the number of other users means if I post to Twitter I get more interaction (people answering if I ask a question, liking a thing I made, etc., all of which is nice).

I am not especially bothered that Mastodon is conceptually more complicated, except if it puts other people off joining. It’s federated, but so are lots of things. If I want to send a postcard to a friend in America, I give it to my local post office, it makes its way through the UK system, gets shipped to America and makes its way through the US system to my friend. I might wonder what on Earth a zip code is and why it’s different from my familiar postcode, but I don’t really need to worry about this. The fact I’m in one system and my friend is in another is taken care of by the systems. Loads of things work like this. If my email is on Outlook, yours is on Gmail and a third person runs their own server, who cares? We can still email each other just fine. So it is on Mastodon – different people on different instances, but everyone can follow each other and exchange messages. I had the thorny ‘which instance do I trust?’ issue dealt with because I know Christian and Colin and trust them, so I set up my account on Mathstodon.

I think what made Mastodon hard to engage with is that there weren’t as many people there. So now the community has grown and a bunch of new people are trying it out, I’ve started opening it more and I’m trying to read and post there.

I think what I want is a nice community of people with similar interests – maths, teaching maths (especially at university), etc. I’d like this to entertain and inform me – not inform about the mainstream news, necessarily (which the tweets I read have become more and more about), but about what’s going on in the mathematical world that I might not find out about otherwise. I’d like this community to engage with stuff I make or do – it’s really nice when someone riffs on something you’ve done or teaches you something about it. I’d like to ask it questions, to be surprised by it, to stumble on wonderful things I wouldn’t have known otherwise. For a while now I’ve heard journalists and others talk about Twitter as exclusively a horrible place where bad things happen, and I think ‘I post a fun maths thing and people like it, or I saw someone share something interesting I liked. It isn’t like that for me.’ But to get this from social media doesn’t require Twitter, its just that Twitter has provided that. Fundamentally, we don’t need to have this nice niche community enjoying itself in a quiet bubble within a large platform that also polarises, upsets and harasses so many. The upside could happen just fine on Mathstodon.

I’m wondering if writing this has organised my thoughts and convinced me to switch. I’ve been running both in parallel for the past couple of weeks and honestly I’ll probably keep doing that. At first, the people finding me on Mathstodon were not the most diverse bunch – techy heavy, for example – but this second week I’ve started to see a greater range of interests and some familiar faces from Twitter popping up in my new followers. There are some people who have switched and I now see in both places. There are others who haven’t and I don’t want to leave behind. Fundamentally, I have 15k people on Twitter and a couple of hundred on Mastodon, and it’s hard to disconnect from the 15k. It’s also about finding a nice way to use Mastodon that fits into my life.

Still, I’ve decided to consciously speed up my detachment from Twitter. I’ve turned down the volume of tweets I see and started checking and posting to Mastodon more often, including stuff I haven’t also posted to Twitter. Let’s call it a trial period, and see how it goes.

]]>I made a new LaTeX package for drawing dice, customdice.

I’ve long struggled to find a dice package I fully like. I have been using epsdice, but it only offers white or black standard dice. I found myself in a situation where I wanted to draw dice with other text on the faces. This package draws the dice face in TikZ and the aim is to offer simple commands that offer high levels of customisation.

Standard dice faces are created using `\dice{num}`

for num an integer from 1-6. For example

`\dice{1} \dice{2} \dice{3} \dice{4} \dice{5} \dice{6}`

There are commands for drawing a face with one big dot and for drawing faces with text (or other LaTeX content). The colour defaults to black on white but can be changed with optional parameters. The size can also be altered. This example shows a range of possibilities:

```
\dice[yellow,black]{4}
\bigdotdice[white,brown]
\textdice[gray,blue]{\(\infty\)}
```

The size is set to fit inline with the text and to respond to the LaTeX font sizes (`\small`

, `\Large`

, etc.). For example:

`D\dice{3}CE \Huge D\dice{3}CE`

You can also change the basic unit of the dice to make bigger images. For example:

```
\Huge
Dice: \dice{5}
\setdicefacesize{3}
\dice{5}
\setdicefacesize{10}
\dice{5}
\setdicefacesize{20}
\dice{5}
```

There is also a command `\layoutdice{face1}{face2}{face3}{face4}{face5}{face6}`

that takes six inputs and places them on an expanded net of a dice cube, like these:

What is drawn on the face is arbitrary, so I can do things like this:

The package is live on CTAN. If you run the following code in MikTeX you should find it installs the package. With TeXLive, you may need to update your packages (or install TeXLive 2022).

```
\documentclass{article}
\usepackage{customdice}
\begin{document}
\dice{6}
\end{document}
```

]]>