2017-05-02

Tupper's self-referential formula

A formula that plots itself! Well, kind of (we'll see).

Fig. 1. Please greet the Tupper's formula!
Tupper's formula is a formula whose plot depicts a pixelated version of itself when plotted on a (x, y) plane. The formula is as follows:

Fig. 2. Tupper's self-referential formula.
Or in LaTeX:
\frac{1}{2} \: < \: \left\lfloor \mathrm{mod}\: \left( \left\lfloor \frac{y}{17} \right\rfloor \: 2^{-17 \lfloor x \rfloor - \mathrm{mod} \left( \lfloor y \rfloor, \: 17 \right)} ,\: 2 \right) \right\rfloor

The trick here is that the plot usually presents a small fraction on the plane, with x ∊ [0, 106] and y in range k to k+17. The formula actually draws every possible 106-by-17 black-and-white image, which you can select by controlling the value of k. It is not even a small wonder you can get the formula picture out of it!

Give it a try below! You can draw on the plot with a mouse and obtain the number for any image you wish. Try drawing your name for example.

k=

Some of interesting numbers are provided below as examples.

Original Tupper's k
960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174350718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173716995165232890538221612403238855866184013235585136048828693337902491454229288667081096184496091705183454067827731551705405381627380967602565625016981482083418783163849115590225610003652351370343874461848378737238198224849863465033159410054974700593138339226497249461751545728366702369745461014655997933798537483143786841806593422227898388722980000748404719

The number for the hello image at the top of this post: 
5246200340203000885360109382922015590048181391657774842877803240708810274087652745197029533810911383897620365903808347694390427818196194804541137175204157207026107970466535520528552148876535032133482874102588897882949329164554884565680506042515680617905431985251777051012152535202990052725109536055331367995574985116915446799985449039181018324936434659971263155585655046763632682131424872242573632210667575174840813894341010431414232333097806709894069251888694427648

Matt Parker's number: 
960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174350718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173716995165232890538221619561473865746304976129424093469921873058694492149444647882055806603996307772920108275439090931487231139508469267169521581872227293630931364751681875244141639118844172571080588839278417813855101724217755801034516516847318278139146496085068307449373183066378525002863703739215155304174822734164455483814441481301873381703922338834284527

The last one comes from Matt Parker's (the notorious standup mathematician) book Things to make and do in the fourth dimension, in which he presents (among other things) Tupper's formula, but can't quite hold himself from introducing an Easter-egg. The number on the page does not correspond to Tupper's original formula. See for yourself (spoiler alert!).

Btw. I can't recommend Matt's book enough! The source code for this post is available here: https://github.com/dagothar/tupper

1 comment:

  1. e=mc^2: 1046837228889652356000716470559998832884877018135097447215572763723866091009917757127984595887664903570920010515403468786920451376209955462721452427299977719039822649533736741219065330531544306274570666893255873627923993915576468537942510557606025649681693356619994772551540843954899537457722581991931444576714728096919008574630815821719142721566305985495040

    ReplyDelete