12 minutes read

8th May 2023

Today, I once again saw a video on Twitter, depicting a “fascinating” maths fact. I won’t link to the tweet, since I despise people who tweet this video in particular and “viral” maths problems in general. But the idea was the following: Take the fraction


It results in \(37\). Now, if you replace all the \(1\)’s with any other digit, you get \(37\) again. I.e.,

\[\begin{matrix} \displaystyle\frac{111}{1+1+1} = \frac{222}{2+2+2} = \frac{333}{3+3+3} =\\ \\ \displaystyle\frac{444}{4+4+4} = \frac{555}{5+5+5} = \frac{666}{6+6+6} =\\ \\ \displaystyle\frac{777}{7+7+7} = \frac{888}{8+8+8} = \frac{999}{9+9+9} = 37. \end{matrix}\]

GIF shocked Pikachu.

If you think about it for a bit, you’ll soon realize that it’s less about the fact that all expressions evaluate to \(37\), but more about the fact that the expressions are all equal. And that trivially so: You can expand (or cancel) any fraction by a factor of \(n\)—i.e. multiply both numerator and denominator by \(n\)—without changing the value of the fraction. This immediately gives us a way to build more such “special” fractions: All we need is a fraction built from \(1\)’s that evaluates to a reasonably nice result. E.g.,

\[\begin{matrix} \displaystyle\frac{11 + 11}{1+1} = \frac{22 + 22}{2+2} = \frac{33 + 33}{3+3} =\\ \\ \displaystyle\frac{44 + 44}{4+4} = \frac{55 + 55}{5+5} = \frac{66 + 66}{6+6} =\\ \\ \displaystyle\frac{77 + 77}{7+7} = \frac{88 + 88}{8+8} = \frac{99 + 99}{9+9} = 11. \end{matrix}\]

So far, so boring. As a human, mathematician and teacher, though, I have two major problems with this.

The Issue

The main problem is that these kinds of posts are often treated as ethereal/magical/mind-blowing revelations about maths. They are not. In this case, it’s something I can teach any 11-year-old shortly after introducing them to fractions. There is nothing surprising about this, and most certainly nothing interesting. At least in this form.

This is worsened by the fact that the people who post these videos very, very often are either

  • content thieves,
  • conspiracy theorists,
  • crypto/NFT/AI grifters,
  • astrologists/numerologists or
  • people with Greek/Roman statue PFPs who complain how everything was better in the past.

Many embody these only on a sub-surface level. And, obviously, it’s not all of them. But you can be pretty sure that if someone posts these kinds of maths facts without any explanation, questions, or context, they are at least one of the above.

The Maths

The more interesting talking point here—from a mathematical and didactical point of view—is whether the pattern shown in the video generalizes/continues beyond just swapping digits. I.e., when we replace all the \(1\)’s with \(10\)’s, do we get


Well, obviously not.1 But, firstly, why doesn’t it work? And, secondly, are there variations of the shown pattern that would work with \(10\), \(11\), \(12\),…? After all, maths is about recognizing and describing patterns2, so it would be much more interesting and useful to explore the pattern and its limits than to just dump it on Twitter.3

I find the second question above particularly interesting, and I suspect that there are some non-trivial variations of this replacement procedure that work with many if not all natural numbers. But I don’t have the time nor the energy right now to look for them. Instead, I give you two more ideas on how to generalize the pattern.

Chang from Community leaning back in a chair with a sombrero on his hat, saying "I'll allow it".

The original post swaps digits for one another, which is unambiguous. One possible question here would be how to adapt the rule if a fraction contains multiple digits. In my opinion, the most natural way to do this is to cycle through the digits. I.e., replace them via the rule4

\[1\to 2\to 3\to 4\to 5\to 6\to 7\to 8\to 9\to 1\to\cdots\]

With this, we could look at a fraction like

\[\frac{2345}{67} = 35\]

and ask what happens if we replace the digits with the next ones in the cycle. E.g., one step farther would be


Is this \(35\) again? Well, obviously not.5 But looking for fractions that would work like this would be an interesting direction to explore. Especially since any working example can’t be hand-waved by expanding the fraction.

GIF of Chris Tucker shooing someone or something away

Another aspect to think about are other bases. Since it is a pattern emerging by manipulating digits, maybe looking at other bases would give us more interesting results. Not the original, of course. The same cancelling argument works, for example, for hexadecimal numbers6 just as well. E.g.,

\[\frac{\text{ccc}_{16}}{\text{c}_{16} + \text{c}_{16} + \text{c}_{16}}=25_{16} = 37_{10}.\]

But other bases would open up the possibility to find more interesting, more general patterns. In particular, with an arbitrary base \(b\) and an arbitrary digit \(x\), the fraction we are looking at is given by

\[\frac{xb^2 + xb + x}{x + x + x}.\]

Not only makes this the cancelling explanation easier to see (I think… 😬), formulating it like this makes it easier to find actually interesting variants.7

Which brings me to a similar statement with an entirely different vibe, to finish off this blog post. It holds that


and the reason is that you can cancel the six:

\[\frac{16}{64}=\frac{1\cancel{6}}{\cancel{6}4} = \frac{1}{4}\]

Of course, this argument is wrong. But I love to show this when I discuss structural mistakes students make when learning fractions for the first time. The mistake above can occur when they only learn/remember

"To expand or cancel a fraction, you have to do the same thing at the top and at the bottom."

instead of the underlying geometric mechanism. Does this mistake actually happen in reality…? Well…

GIF of Elmo shrugging

But it’s always a good laugh and drives home the point. When I wrote this example into a presentation a few years ago, I wondered if there are other fractions like this. I.e., are there digits \(x\), \(y\) and \(z\) such that

\[\frac{10x + y}{10y + z}=\frac{x}{z}?\]

Or, with an arbitrary basis \(b\): When does

\[\frac{bx + y}{by + z}=\frac{x}{z}\]

hold? For the base \(10\) case, I just brute-forced it with a small Ruby program. The four fractions for which this works are

\[\frac{16}{64},\quad \frac{26}{65},\quad \frac{19}{95},\quad \frac{49}{98}.\]

If you fiddle around with the general equation, you’ll soon find a quadratic polynomial in \(x\), \(y\) and \(z\) that was reasonably unpleasant for me to not try to actually solve in full generality. So, I would conclude that there is no “obvious” pattern to be found here. But! There are a few neat special cases.

If you stare at the four solutions, you see that the digits are all very small, very large or very close to \(5\) which is half our base \(10\). I mean… The only digits not fulfilling that are \(3\) and \(7\), so it could be a statistical fluke. But it’s a good enough heuristic to start from. And, in deed, you can show that for any even base \(b\) it holds that

\[\frac{1\cdot b + (b - 1)}{(b-1)\cdot b + \frac{b}{2}} = \frac{1}{\frac{b}{2}},\]

so, \((x,y,z) = \left(1, b-1, \frac{b}{2}\right)\) is always a solution in this case. For example, in base \(8\) we have


and in base \(16\) we have


The other solutions don’t find into such nice formulas, AFAIK. But it’s charming that there is s a bit of structure in this false cancellation technique.

Which brings us back to the top of this post: If you post trivial maths on Twitter, at least try to make it interesting.

Arnold Schwarzenegger looking menacing

If you want to read a more eloquent exploration of viral maths, check out the book “Maths Tricks to Blow Your Mind: A Journey Through Viral Maths” by Kyle D Evans. It’s really good!!

  1. It’s \(3367\). 


  3. There are obviously a lot people who can get away with just dumping something interesting looking on Twitter. Prime examples are Matt Henderson and Oskar Stålberg. But they post stuff they created themselves. So, they can and do back it up if asked and explain why it it actually is interesting and doesn’t just look like that. 

  4. How to deal with the digit \(0\) is a whole nother issue. Best to ignore it. 

  5. It’s \(\approx 44.308\). 

  6. Link to the Wikipedia article 

  7. Which I still refuse trying to find.