
Tupper’s Self-Referential Equation - valgaze
http://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html
======
anderskaseorg
Old news, but there’s nothing self-referential about a formula that draws all
possible bitmaps of height 17, where the bitmap is encoded by the gigantic
number n (not displayed in the image!) that defines the y coordinate where we
choose to start the graph. Tupper himself didn’t even call it self-
referential.

For more details on how it works, see my Quora answer:
[http://qr.ae/TbcJFK](http://qr.ae/TbcJFK).

~~~
amelius
The bitmap is 105x16==1680 pixels, or bits. And 2^1680 is about 5*10^505,
which is about the magnitude of n.

So, indeed, nothing to see here.

------
muthdra
I showed this to my teacher once. He looked at the equation and cracked it in
a second. He even said the guy who made the formula probably used simple logic
tricks to create it.

See, if you take that giant number for _n_ and convert it to binary, you will
get a long stream of bits. Take every 17 of those and draw them as an
individual column of pixels. 0 is white and 1 is black. That's it. You'll see
the "pixelated" plotting of the equation (but maybe mirrored or upside-down.
Not sure).

My teacher showed me how you can use _floor_ and _mod_ (heavily used in
Tupper's equation) to shave off bits from both sides of the sequence of bits
that represent an integer. I have to ask him again, sometime. That was pretty
dope.

I had a file called tupper.py that would let you draw something and then it
would convert it to the corresponding _n_ for Tupper's Self-Referential
Equation. It would simply loop in the proper direction through your
monochromatic drawing and annotate 1 if a pixel was painted and 0 otherwise.
The result was the binary representation of the _n_ where you would find your
drawing.

~~~
lisper
It's a program rendered as an equation. That's still kinda cool IMHO.

------
andy-wu
There's a great Numberphile video on this:
[https://www.youtube.com/watch?v=_s5RFgd59ao](https://www.youtube.com/watch?v=_s5RFgd59ao)

