Hold onto your logic hats! In this article we're going to explore one of the most amazing formulas in maths: *Tupper's self-referential formula.*

### Meet the monster

The protagonist of our story is the following inequality

(1) |

Looks frightening, but we can unravel it. The symbols and together denote the *floor function*: for a real number , the floor of is the largest integer that's no bigger than . For example, The function computes the remainder you get when you divide by , for example Given two integers and you can work out the right hand side of expression (1) and then see if the inequality is satisfied. (See here for an example.)

The Dr. Frankenstein behind this creature is computer scientist Jeff Tupper. In a 2001 paper Tupper introduced this expression merely as an example; it was just one function that could be plotted with graphing software. To create a plot from the formula imagine portioning the (x,y)-plane into squares of side length 1 as shown below:

Here, the bottom left square has coordinates , the one to its right has coordinates , the one above it has coordinates and so on. To plot Tupper’s inequality we let run from 0 to 105, so that’s 106 squares in total.

The plot works by either colouring a square or not colouring it: a square with coordinates is coloured if the inequality is true for and . If not the square is left blank.

If you plot the plot for many values of and , the outcome is the following:

I'll let that sink in a moment. No, your eyes are not deceiving you, the formula plots a bitmap picture of itself! Hence the name *Tupper's self-referential formula* (though Tupper never called this function that himself in his 2001 paper).

There is one missing detail, however. I haven’t told you the value of the number on the -axis. It’s the following 543 digit number:

*N*=960 939 379 918 958 884 971 672 962 127 852 754 715 004 339 660 129 306 651 505 519 271 702 802 395 266 424 689 642 842 174 350 718 121 267 153 782 770 623 355 993 237 280 874 144 307 891 325 963 941 337 723 487 857 735 749 823 926 629 715 517 173 716 995 165 232 890 538 221 612 403 238 855 866 184 013 235 585 136 048 828 693 337 902 491 454 229 288 667 081 096 184 496 091 705 183 454 067 827 731 551 705 405 381 627 380 967 602 565 625 016 981 482 083 418 783 163 849 115 590 225 610 003 652 351 370 343 874 461 848 378 737 238 198 224 849 863 465 033 159 410 054 974 700 593 138 339 226 497 249 461 751 545 728 366 702 369 745 461 014 655 997 933 798 537 483 143 786 841 806 593 422 227 898 388 722 980 000 748 404 719.

If you look at the squares with -coordinates between and (and ignore all squares with -coordinates less than and greater than , you will see the bitmap image of Tupper’s formula itself.

### The Plot Thickens

Now let’s take it up a notch. Say we didn’t like our 543-digit value of and wanted to scroll up and down the -axis and see what plots we get then. As you scroll up and down the -axis from minus infinity (indicated by the downwards direction) to plus infinity (indicated by the upward direction) Tupper’s formula plots almost everything.

Any picture that can be represented by a grid of pixels of dimensions 106x17 using two colours is somewhere in the plot of the formula for a particular values of . Here are some examples.

This is Euler's identity, one of the most famous equations in mathematics and often deemed the most beautiful:

Euler’s identity appears for -coordinates between and , where

*N*=23 520 359 399 496 581 221 408 296 491 979 609 293 069 748 136 250 282 632 929 347 819 540 735 954 955 446 141 406 484 573 424 156 488 732 522 345 562 080 420 479 6011 434 955 111 022 376 601 635 853 210 476 633 318 991 990 462 192 687 999 109 308 209 472 315 419 713 652 238 185 967 518 731 354 596 984 676 698 288 025 582 563 654 632 501 009 155 760 415 054 499 960.

Next there is a picture of the Gaussian integral, another favourite expression in maths:

The corresponding value of is

*N*=156 987 402 179 570 082 907 078 791 551 211 618 836 789 749 600 368 204 518 384 965 530 593 042 781 593 968 045 017 673 854 255 572 790 978 425 505 951 477 622 475 674 449 000 956 516 765 083 074 858 053 781 764 316 876 326 523 038 849 501 790 645 548 158 781 893 81 448 932 035 874 145 965 881 631 363 964 883 085 974 756 487 867 902 744 830 960 668 082 577 437 782 189 064 512 907 889 924 899 300 621 786 362 424 181 692 579 651 239 045 992 794 686 365 369 708 864 611 291 854 934 130 524 940 679 843 180 800 552 468 281 283 793 284 632 769 100 458 995 693 741 829 668 924 772 738 264 539 491 965 665 810 196 314 332 016 077 292 880 174 239 602 703 695 648 943 390 464 074 020 112 302 080.

Obviously, we don't need to restrict ourselves to pictures of mathematical expressions. Any 106x17 grid of pixels can be found somewhere in the plot of Tupper's formula.

### From picture to *N*

As previously explained, the plotting of this bitmap function transpires over a series of squares. Say you had a picture in mind you wanted to graph and needed to know the corresponding *N*-value — how would you find it? The process is rather simple:

- Beginning in the bottom left pixel of your desired image, write down a 1 if the pixel is coloured in or a 0 if it is blank. Now consider the square directly above and write down either a 1 or 0 in the same way.
- Continue to move up the first column. Once the first column is dealt with, move onto the second column beginning with the bottom square in this second column. Repeat the allocation of 0s and 1s as above.
- Move up the second column, then the third, fourth, fifth and so on until you have assigned a 0 or 1 to each pixel in each column of the 106x17 pixel image.
- You will now have an incredibly long string of 0s and 1s (a 1802 digit string to be exact). This string represents a binary number. Convert this number into base 10 and multiply by 17.
- Like magic , you now have the value of that corresponds to the image you want to plot.

If you would like to play with Tupper's formula yourself, then visit this website. You can email your creations to us, together with the corresponding value of *N*, and we'll publish the best ones!

You might also want to watch the *Numberphile* video below.

Enjoy!

### About the author

Harmeet Singh is an A-Level student from London. His A-Levels include Maths, both Further and Advanced, alongside English Literature. He is incredibly passionate about pure mathematics, particularly the Riemann Hypothesis and analysis. Harmeet hopes to complete a mathematics degree at Trinity College, Cambridge, leading onto a professorship and FRS, akin to his idols Ramanujan and G.H. Hardy.

## Comments

## nice article

Nice article - thanks. I'm going to have a play on the linked website!