Tupper’s Self-Referential Formula

Tupper’s formula is one of the most fascinating mathematical curiosities. At first glance, it looks like a complicated inequality, but its power is astonishing: it can encode any image of size 106×17 pixels using a single gigantic number! Even more mind-blowing, there exists a constant k that makes the formula literally draw itself — the equation can visualize its own form.
What’s even more exciting? I added my own custom image k, but you can create your own custom k for any black-and-white picture you like! Every signature, symbol, or pixel art has a corresponding number. Once you find your constant, you can plug it in and watch the formula come to life.
The Formula
Tupper’s formula was created by Jeff Tupper, a mathematician and computer scientist. This remarkable inequality is known as a self-referential formula, because, with the right constant, it can graphically display the formula itself or any other 106×17 pixel image. Here is the formula visually rendered using MathJax:
\[ \frac{1}{2} < \left\lfloor \operatorname{mod}\Big( \Big\lfloor \frac{y}{17} \Big\rfloor \cdot 2^{-17 \lfloor x \rfloor - \operatorname{mod}(\lfloor y \rfloor, 17)}, 2 \Big) \right\rfloor \]
Plotting this inequality over 0 ≤ x < 106 and k ≤ y < k + 17 will reveal a picture — wherever the inequality is true, a dark pixel appears.
My Custom Image Constant
For my own custom picture, the constant k is:
5334391170668203271929169079370048829641908957426626699316674926560096468344665130271742308787411922036921018352984183619064931209220461325508092079923297945318642403459671355028839705645376182755486343351707602944430345427272574474519576576
This is just one example — you can create your own image k for anything you like. The possibilities are endless!
Why This Formula Is So Exciting
Imagine a single, static mathematical inequality that has the ability to store and display entire images. It’s like a tiny piece of code that contains an entire artwork. It’s exciting not just because of its visual effect, but because it shows the sheer power of mathematics — a single formula can encode a huge amount of information deterministically.
Tupper’s formula sparks curiosity and wonder: you can create your own artwork, your own signature, or even the formula itself using the same principle. Every 106×17 bitmap has a corresponding number — a hidden world of images, all waiting to be decoded.
Online Visualization
Learn More
- Numberphile — “The Everything Formula”
- Wikipedia: Tupper’s Self-Referential Formula
- Tupper's Formula Tools
✨ Mathematics can literally draw itself. That’s the amazing power of Tupper’s Formula — and now it’s your turn to create your own!