# The Big Internet Math-Off 2024, Round 1, Match 1

It’s math-off time!

Here’s the first match in this year’s Big Internet Math-Off. Today, we’re pitting Katie Steckles against Benjamin Dickman.

Take a look at both pitches, vote for the bit of maths that made you do the loudest “Aha!”, and if you know any more cool facts about either of the topics presented here, please write a comment below!

## Katie Steckles – Prime Chunks of π

I’m always on the lookout for interesting maths, and one place I often find some of the most interesting stuff is in the crossovers between different mathematical ideas. What happens when you look at the intersection of topological shapes and colouring problems, or the parts where functions meet fractals, or the crossover between flexagons and the fold and cut theorem? (I’m not saying any of these are potential ideas for my entries in future rounds of the Math Off, but I’m also not not not not saying that.)

One of my favourite mathematical crossovers comes between two numerical classics of the genre: prime numbers, and π. Everyone’s $$\frac{\tau}{\pi}$$th favourite circle constant, meeting the indivisible building blocks of the integers. What could possibly go wrong?

We all know that the digits of π go on forever, and never repeat. This makes them a useful source if you ever want a string of seemingly random digits, since they keep going and there’s not a discernible pattern in them. But what if we look for a pattern in them? And in particular, if we look for prime numbers?

For example, the first digit (3) is a prime. Success! But for the sake of argument, let’s keep going. The next digit (1) is, assuming we’re doing it right, not a prime number.

But if we look a little further, and include the following digit as well, we get the number 14, which is… also not a prime. But 141, which we make by extending a little further, is… also not a prime number.

With a little patience, we’ll find (having been disappointed once more by 1415, which is shockingly divisible by 5), that we can go as far as 14159, which is gloriously prime. It’s also immediately followed by 2 – straight in the bucket of primes.

This can continue – the disappointment of 6 and 65 are outweighed by the beauty of the prime that is 653. It’s followed by 5, one of the classic small primes, then (not 8 but) 89, then 7.

9 isn’t prime (as much as my subconscious brain wants to include it whenever I give a list of primes), nor is 93, or 932 – but 9323 is, giving us another wonderful entry on our list.

And you might imagine we can carry on this way, theoretically forever – chunking off prime pieces of π and serving them up with ice cream. But while the digits of π do theoretically provide an infinite string of primes using this method, not all of them are quite so easy to swallow.

At this point in the decimal expansion of π, we find an unhelpful succession of frustratingly even digits: 8, 4, 6, 2, 6, 4 – none of which are of any use to us at all in making another prime. In fact, the next chunk of digits we can section off into a prime number is actually

846​264​338​327​950​288​419​716​939​937​510​582​097​494​459​230​781​640​628​620​899​862​803​482​534​211​706​798​214​808​651​328​230​664​709​384​460​955​058​223​172​535​940​812​848​111​745​028​410​270​193​852​110​555​964​462​294​895​493​038​196​442​881​097​566​593​344​612​847​564​823​378​678​316​527​120​190​914​564​856​692​346​034​861​045​432​664​821​339​360​726​024​914​127​372​458​700​660​631​558​817​488​152​092​096​282​925​409​171​536​436​789​259​036​001​133​053​054​882​046​652​138​414​695​194​151​160​943​305​727​036​575​959​195​309​218​611​738​193​261​179​310​511​854​807​446​237​996​274​956​735​188​575​272​489​122​793​818​301​194​912​983​367​336​244​065​664​308​602​139​494​639​522​473​719​070​217​986​094​370​277​053​921​717​629​317​675​238​467​481​846​766​940​513​200​056​812​714​526​356​082​778​577​134​275​778​960​917​363​717​872​146​844​090​122​495​343​014​654​958​537​105​079​227​968​925​892​354​201​995​611​212​902​196​086​403​441​815​981​362​977​477​130​996​051​870​721​134​999​999​837​297​804​995​105​973​173​281​609​631​859​502​445​945​534​690​830​264​252​230​825​334​468​503​526​193​118​817​101​000​313​783​875​288​658​753​320​838​142​061​717​766​914​730​359​825​349​042​875​546​873​115​956​286​388​235​378​759​375​195​778​185​778​053​217​122​680​661​300​192​787​661​119​590​921​642​019​893​809​525​720​106​548​586​327​886​593​615​338​182​796​823​030​195​203​530​185​296​899​577​362​259​941​389​124​972​177​528​347​913​151​557​485​724​245​415​069​595​082​953​311​686​172​785​588​907​509​838​175​463​746​493​931​925​506​040​092​770​167​113​900​984​882​401​285​836​160​356​370​766​010​471​018​194​295​559​619​894​676​783​744​944​825​537​977​472​684​710​404​753​464​620​804​668​425​906​949​129​331​367​702​898​915​210​475​216​205​696​602​405​803​815​019​351​125​338​243​003​558​764​024​749​647​326​391​419​927​260​426​992​279​678​235​478​163​600​934​172​164​121​992​458​631​503​028​618​297​455​570​674​983​850​549​458​858​692​699​569​092​721​079​750​930​295​532​116​534​498​720​275​596​023​648​066​549​911​988​183​479​775​356​636​980​742​654​252​786​255​181​841​757​467​289​097​777​279​380​008​164​706​001​614​524​919​217​321​721​477​235​014​144​197​356​854​816​136​115​735​255​213​347​574​184​946​843​852​332​390​739​414​333​454​776​241​686​251​898​356​948​556​209​921​922​218​427​255​025​425​688​767​179​049​460​165​346​680​498​862​723​279​178​608​578​438​382​796​797​668​145​410​095​388​378​636​095​068​006​422​512​520​511​739​298​489​608​412​848​862​694​560​424​196​528​502​221​066​118​630​674​427​862​203​919​494​504​712​371​378​696​095​636​437​191​728​746​776​465​757​396​241​389​086​583​264​599​581​339​047​802​759​009​946​576​407​895​126​946​839​835​259​570​982​582​262​052​248​940​772​671​947​826​848​260​147​699​090​264​013​639​443​745​530​506​820​349​625​245​174​939​965​143​142​980​919​065​925​093​722​169​646​151​570​985​838​741​059​788​595​977​297​549​893​016​175​392​846​813​826​868​386​894​277​415​599​185​592​524​595​395​943​104​997​252​468​084​598​727​364​469​584​865​383​673​622​262​609​912​460​805​124​388​439​045​124​413​654​976​278​079​771​569​143​599​770​012​961​608​944​169​486​855​584​840​635​342​207​222​582​848​864​815​845​602​850​601​684​273​945​226​746​767​889​525​213​852​254​995​466​672​782​398​645​659​611​635​488​623​057​745​649​803​559​363​456​817​432​411​251​507​606​947​945​109​659​609​402​522​887​971​089​314​566​913​686​722​874​894​056​010​150​330​861​792​868​092​087​476​091​782​493​858​900​971​490​967​598​526​136​554​978​189​312​978​482​168​299​894​872​265​880​485​756​401​427​047​755​513​237​964​145​152​374​623​436​454​285​844​479​526​586​782​105​114​135​473​573​952​311​342​716​610​213​596​953​623​144​295​248​493​718​711​014​576​540​359​027​993​440​374​200​731​057​853​906​219​838​744​780​847​848​968​332​144​571​386​875​194​350​643​021​845​319​104​848​100​537​061​468​067​491​927​819​119​793​995​206​141​966​342​875​444​064​374​512​371​819​217​999​839​101​591​956​181​467​514​269​123​974​894​090​718​649​423​196​156​794​520​809​514​655​022​523​160​388​193​014​209​376​213​785​595​663​893​778​708​303​906​979​207​

Yes, that’s a prime number 3057 digits long. After teasing us with manageable 2-, 3- and 4-digit beauties, and even some delicate single-digit primes, the decimals of π have dumped in our lap a heap of digits so vast it’s almost boring.

This seems like an incredible coincidence. What would possibly possess whichever number devil wrote this number to make it have such a strange distribution of prime lengths? But when I thought about this a little longer, I gradually realised what was going on here.

While the prime numbers, much like the digits of π, are mysterious and unpredictable, there are some patterns they’re known to follow. The Prime Number Theorem tells us that for a given value N, the number of primes less than N can be relatively well predicted.

The prime counting function $$\pi(N) = \frac{N}{\ln(N)}$$ tells me that there are roughly 21 primes less than 100 (in fact there are 25), 144 primes below 1000 (actually there’s 168) and 1086 primes below 10,000. But these ranges are getting bigger much quicker than the number of primes is: the prime numbers get further apart as the numbers get larger, and the density is decreasing.

This also means that given a particular number of digits, the probability that any given random string of digits of that length is a prime will get smaller very quickly as the numbers of digits gets larger; roughly 8.6% of 5-digit numbers are prime, and only 7.2% of 6-digit numbers.

So if we’re looking for primes in a specific string of digits, we’re relying heavily on these probabilities to line up if we want to keep finding primes – and once we get into 6 or 7 digits, that probability gets pretty low. All we’d need to trip us up is a successive string of, say, digits divisible by 2 or 5, none of which can occur at the end of a prime number written in base 10, and we’d… oh.

So that chunk of even digits is much more or a problem than it initially seems – by the time we get to numbers that start 846264, the primes are so spaced out that none of the possible digits placed in that next spot would give a prime. And of the numbers starting 8462643, only one of them – 84626431 – is prime (but sadly π just gives us another 3). Once we reach this length of string, the probability of hitting another prime is so small, it’s easy to see how it takes a very long time before we get to the next one.

It doesn’t get much better after that either – the next digits of π are 73, then 467 (two perfectly manageable primes), but then we dive off into a 14650-digit monster. (for reference, A047777 in OEIS is the primes, and A121267 gives the corresponding lengths).

Another nice consequence of this is that it’s not a phenomenon unique to π – other infinite non-repeating decimal expansions also suffer from gigantic prime chunks. e starts with a 2, then a 7, then the next prime is 649 digits long. The square root of 2, with its unhelpful ‘14142’ opener, takes 55 digits before we even get to the end of our first prime. But even though the maths tells us this kind of thing is likely, it still somehow feels a little unexpected.

So the next time you’re looking for an interesting fact about π to share, try chopping it up into prime numbers and watch people’s faces when you tell them what happens.

Katie Steckles is a mathematician based in Manchester, who gives talks and workshops and writes about mathematics. She finished her PhD in 2011, and since then has talked about maths at universities, schools events, festivals, on BBC radio and TV, in books and on the internet. You can find her on Mathstodon, Instagram, and as part of The Finite Group (and here on The Aperiodical).

## Benjamin Dickman – Sharing is Caring

I’m hopeful that The Big Internet Math-Off will bring mathematical joys – and perhaps even surprises! – to its readers. Thinking back, here are a couple of mathematical tidbits that I enjoyed and/or surprised me back when I was young and still had light behind my eyes:

1. I always enjoyed sequences and series, and I recall learning that the sum $$\sum_{n\geq 1} 1/n^p$$ converges when $$p \gt 1$$. Seeing that it diverged for $$p = 1$$ was enjoyable, but not knowing what it converged to for $$p \gt 1$$ was an early frustration of mine. Pleasantly, I learned that at least one value is well known: $$\sum_{n\geq 1} 1/n^2 = \pi^2/6$$.
1. Mathematicians finish their proofs in different ways: after $$n$$ too many jokes about “Q.E.D.” standing for “Quite Easily Done,” I have come to enjoy the various boxes that are often referred to as tombstones. A reminder not only that mathematics is alive, but also that every time you use a result or its proof, you are essentially invoking a zombie.

For today’s mathematical vivacity let us consider the following problem:

Randomly pick two positive integers; what is the probability that their only shared factor is 1?

Now, you cannot really pick two elements at random from the positive integers; so, let us be a bit more precise and say… pick two positive integers in [1, really big]. The mathematical term for their largest shared factor is the greatest common divisor, which is often abbreviated as gcd, and we say that positive integers whose only shared factor is 1 are relatively prime. This means that the sharing that we are caring about can be rephrased as:

What is the probability that two “randomly” chosen positive integers are relatively prime?

We will solve this problem in mere moments, but first: What does your intuition tell you? If you want to test your intuition, you could try typing gcd(a,b) into WolframAlpha where each of a and b is formed by mashing a number pad. I tried this just now and, indeed, they are relatively prime. Give it a shot!

My intuition unfolds as follows: With a probability problem, the answer is probably 0 or 1; it could be ½ to be tricky; and, in cases where the problem is unfamiliar, it is probably 1/e or something related. If you want to gather more data from WolframAlpha, go for it; I ended up using GPT to simulate this 100,000 times for positive integers chosen in the range [1, 1050]. The simulation found the proportion with a gcd of 1 to be 0.60813.

My intuition now suggests that this is converging to $$1-1/e = 0.6321\ldots$$ I’ve seen enough problems to make that guess with confidence of, idk, about $$1/e$$; the next step could be to verify it, but that is difficult to do for a conjecture that is flat out wrong.

Okay: Let’s investigate the problem and find the correct answer! Imagine the first quadrant in the xy-plane and make a dot at $$(a,b)$$ when $$\gcd(a,b) = 1$$. We will focus only on points with coordinates that are both positive integers, which transforms our problem into: Zooming further and further out, what proportion of the total coordinates have dots?

Here is a graph of the dots as $$a$$ and $$b$$ range from 1 to 1000:

Visualization is a great tool for making sense of mathematics problems. And. I do not find this particular graph to be especially helpful – at least for finding the exact answer. The graph does suggest that the ratio probably (?) is not going to zero. But who knows!

Let’s zoom in a bit and consider integers chosen in [1, 100]:

(A sensemaking checkpoint: Why are there no black dots along the main diagonal? And why are there so few along the horizontal and vertical lines emanating from 30?)

Rather than staring at the black dots in search of an epiphany, let us consider what is happening for the white dots. We know that they indicate a gcd that is greater than 1; so, let’s try putting dots at $$(a,b)$$ when $$\gcd(a,b) = 2$$; then try it for $$\gcd(a,b) = 3$$. Maybe we’ll try $$\gcd(a,b) = 4$$ later.

Now, the astute reader (either the one who is already astute, or the one who will momentarily become astute) will notice that the three graphs above have different ranges from which the integers were chosen. The idea is as follows: Consider points $$(a,b)$$ such that $$\gcd(a,b) = 1$$. We can now consider $$(2a,2b)$$ to match them up with points that have a gcd of 2. Similarly, we could triple them and consider $$(3a,3b)$$ to match them up with points that have a gcd of 3.

When we look at Table 3, we see that the picture for gcd=1 among [1,8] looks rather like gcd=2 among [1,2×8], and both look rather like the image for gcd=3 among [1,3×8]. (Look at the dots and blank spaces!) If we pursued this further, our next graph would investigate gcd=4 among [1,4×8]. Perhaps you are now prepared to predict what it will look like:

At this point, we are nearing the finish line. The remainder of the argument, modulo a bit of hand waving, goes as follows:

Color the points with gcd=1 in a first color; color those with gcd=2 in a second color, and observe that the latter match with the former using a transformation of $$(a,b) \to (2a,2b)$$, which means that, in some sense, they appear only 1/4 as often. Similarly, we color those with gcd=3 in a third color and, due to the matching of $$(a,b) \to (3a,3b)$$, they appear only 1/9 as often as the first batch of points. Continuing in this way for all positive integers, let us denote by p the proportion that we are interested in, namely, those with gcd=1. Then, the proportion with gcd=2 can be expressed as $$p/4$$, the proportion with gcd=3 as $$p/9$$, and so forth, from which we can sum them all up to find:

$p + \frac{p}{4} + \frac{p}{9} + \frac{p}{16} + \ldots + \frac{p}{n^2} + \ldots$

How can we interpret this series? Well, the first term is the probability we are interested in, i.e., that two randomly selected positive integers have gcd=1; the second term is the probability that they have gcd=2; etc. Continuing on (and on and on) we can view this infinite series as accounting for all possible gcd’s; since any pair of numbers must have some gcd, the series at hand covers all possible scenarios without overlap. In particular, it sums to 1:

$p + \frac{p}{4} + \frac{p}{9} + \frac{p}{16} + \ldots + \frac{p}{n^2} + \ldots = 1$

Understanding this step (or, at the least, making peace with it) prepares us to solve for p: We factor it out from the left hand side to find:

$p\left(\frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \ldots\right) = p\left(\sum_{n \geq 1} \frac{1}{n^2} \right) = p\left(\frac{\pi^2}{6}\right) = 1$

where we used the first item at the beginning of this post to rewrite that parenthetical infinite series as $$\pi^2/6$$. This leads us to an answer of $$p=6/\pi^2 = 0.6079\ldots$$, which fits rather nicely with our earlier simulation! And that is the answer: $$6/\pi^2$$ (just like my intuition suggested… 👀)

The reader is encouraged to press forward with other explorations; you might consider the probability that among three “randomly” chosen positive integers the probability that their gcd (the greatest common divisor that goes evenly into all three integers) is 1. A similar argument, perhaps even graphed with different colored points in a cube, leads to an analogous answer with our initial series changed to have an exponent of three: $$1/\left(\sum_{n \geq 1} \frac{1}{n^3}\right)$$.

You may wonder whether this last number’s denominator has a snazzy formula like $$\pi^2/6$$. The answer is… unknown! In fact, not much is known about this number. It’s called Apéry’s Constant and named after Roger Apéry – a mathematician who proved it’s irrational. In fact, our friend Roger was so pleased with his proof that it’s an irrational number that he memorialized it as a Q.E.D. on his own life: a rather fitting way to close out our write-up:

Notes

1. This write-up is based on the wonderfully assembled PCMI (Park City Mathematics Institute) Summer 2023 materials.

2. Thank you to Jay Cummings for bringing this gravestone to my attention in a twxxt.

3. You can find a bit more about Apéry’s Constant in the Aperiodical in an appropriately named post called Apéryodical. (The assertion proved here is stated in that post without proof!)

4. If you want to try your hand at a further problem, we closed with a “proof” concerning the case of three positive integers that share no common divisor other than 1. A variation on this question would be to ask for the probability that, among three randomly selected positive integers, any two of the three have gcd=1; in other words, what is the probability that they are pairwise relatively prime? What does your intuition tell you?

5. Generalize the problem in Note 4 to the case of k randomly selected positive integers being pairwise relatively prime. What does my intuition tell me?

6. A different proof approach uses something called Möbius inversion. Write out your own explanation using this alternative approach. I don’t really know what Möbius inversion is, so I will appreciate it if you can make it understandable to me!

Benjamin Dickman is a mathematics teacher at a girls’ day school in New York City and a two-time Fulbrighter. His doctoral dissertation was on creativity and problem posing with the times table. He created the word game FiddleBrix! You can find him on X and Bluesky.

So, which bit of maths has tickled your fancy the most? Vote now!

Match 1: Katie Steckles vs Benjamin Dickman

Benjamin with gcds and 6/π²
Katie with prime chunks of π

Total Voters: 208

This poll is closed.

The poll closes at 08:00 BST tomorrow. Whoever wins the most votes will get the chance to tell us about more fun maths in the quarter-final.

Come back tomorrow for our second match in round 1, pitting Angela Tabiri against Max Hughes, or check out the announcement post for your follow-along wall chart!

• #### Christian Lawson-Perfect

Mathematician, koala fan, Aperiodical editor. Usually found paddling in the North Sea, or fiddling with computers.

### 3 Responses to “The Big Internet Math-Off 2024, Round 1, Match 1”

1. StevSquared

This is going to be fun!

From what I know about reader polls and long articles, the first article is going to have a big advantage over the second one. Have you considered presenting them equally somehow? Perhaps by randomising their order on the page, or by having parallel links?