previous overview next
Number of the Beast
Before going any further, let's illustrate the theory so far at hand of a not too simple example:
the Number of the Beast. Which is $666$.
It turns out that it is convenient to start with finding the bitmap of that number first.
$$
\begin{array}{l}
-2^9 \; : & 666 - 512 & \rightarrow \\
-2^7 \; : & 154 - 128 & \rightarrow \\
-2^4 \; : & 26 - 16 & \rightarrow \\
-2^3 \; : & 10 - 8 & \rightarrow \\
-2^1 \; : & 2 - 2 = 0 &
\end{array}
$$
Hence : $666 = 2^9 + 2^7 + 2^4 + 2^3 + 2^1$ . And the bitmap is:
1010011010
9 7 43 1
An array representation (with reverse ordering) is immediately derived herefrom : $666 = \{\;9\;7\;4\;3\;1\;\}$ .
In order to be able to derive the string representation, all of the bitmaps of the members of this set must be known as well:
9 = 1001 7 = 0111 4 = 0100 3 = 0011 1 = 0001
Giving for the array representations:
$$
9 = \{\;3\;0\;\} \quad ; \quad 7 = \{\;2\;1\;0\;\} \quad ; \quad 4 = \{\;2\;\}
\quad ; \quad 3 = \{\;1\;0\;\} \quad ; \quad 1 = \{\;0\;\}
$$
And for the binary number representations:
$$
9 = 2^3 + 2^0 \quad ; \quad 7 = 2^2 + 2^1 + 2^0 \quad ; \quad 4 = 2^2 \quad ; \quad 3 = 2^1 + 2^0 \quad ; \quad 1 = 2^0
$$
So it turns out that two representations are still missing:
2 = 0010 0 = 0000
$$
2 = \{\;1\;\} \quad ; \quad 0 = \{\;\}
$$
$$
2 = 2^1
$$
Now we are ready to plug the members into the string, step by step:
$$
666 = \{\;9\;7\;4\;3\;1\;\} = \\
\{\quad\{\;3\;0\;\}\quad\{\;2\;1\;0\;\}\quad\{\;2\;\}\quad\{\;1\;0\;\}\quad\{\;0\;\}\quad\} = \\
\{\quad\{\;\{\;1\;0\;\}\;\{\;\}\;\}\quad\{\;\{\;1\;\}\;\{\;0\;\}\;\{\;\}\;\}\quad\{\;\{\;1\;\}\;\}\quad\{\;\{\;0\;\}\;\{\;\}\;\}\quad\{\;\{\;\}\;\}\quad\} = \\
\{\quad\{\;\{\;\{\;0\;\}\;\{\;\}\;\}\;\{\;\}\;\}\quad\{\;\{\;\{\;0\;\}\;\}\;\{\;\{\;\}\;\}\;\{\;\}\;\}\quad\{\;\{\;\{\;0\;\}\;\}\;\}\quad\{\;\{\;\{\;\}\;\}\;\{\;\}\;\}\quad\{\;\{\;\}\;\}\quad\} = \\
\{\quad\{\;\{\;\{\;\{\;\}\;\}\;\{\;\}\;\}\;\{\;\}\;\}\quad\{\;\{\;\{\;\{\;\}\;\}\;\}\;\{\;\{\;\}\;\}\;\{\;\}\;\}\quad\{\;\{\;\{\;\{\;\}\;\}\;\}\;\}\quad\{\;\{\;\{\;\}\;\}\;\{\;\}\;\}\quad\{\;\{\;\}\;\}\quad\}
\quad \Longrightarrow \\ 666 = \{\{\{\{\{\}\}\{\}\}\{\}\}\{\{\{\{\}\}\}\{\{\}\}\{\}\}\{\{\{\{\}\}\}\}\{\{\{\}\}\{\}\}\{\{\}\}\}
$$
The implementation in Delphi Pascal is a recursive routine:
function Elements(G : integer) : string;
Let's do it the other way around:
$$
\{\{\{\{\{\}\}\{\}\}\{\}\}\{\{\{\{\}\}\}\{\{\}\}\{\}\}\{\{\{\{\}\}\}\}\{\{\{\}\}\{\}\}\{\{\}\}\} = \\
\{\{\{\{0\}0\}0\}\{\{\{0\}\}\{0\}0\}\{\{\{0\}\}\}\{\{0\}0\}\{0\}\} = \\
\{\{\{10\}0\}\{\{1\}10\}\{\{1\}\}\{10\}1\} = \\
\{\{30\}\{210\}\{2\}3\;1\} = \\
\{9\;7\;4\;3\;1\} = \\
666
$$
This procedure too has been programmed as a recursive routine in Delphi Pascal:
function Natural(hereditarily : string) : integer;
It is noticed that such a routine should always be preceded by a check on correct
syntax, something that has not been done in the present rapid prototyping. (As
a consequence, sets can be processed now which are not really well formed sets)
At last, we can equivalently write : $666 =$
$$
2^9 + 2^7 + 2^4 + 2^3 + 2^1 = \\
\large 2^{(2^3+2^0)} + 2^{(2^2+2^1+2^0)} + 2^{2^2} + 2^{(2^1+2^0)} + 2^{2^0} = \\
\Large 2^{(2^{(2^1+2^0)}+2^0)} + 2^{(2^{2^1}+2^{2^0}+2^0)} + 2^{2^{2^1}} + 2^{(2^{2^0}+2^0)} + 2^{2^0} = \\
\LARGE 2^{(2^{(2^{2^0}+2^0)}+2^0)} + 2^{(2^{2^{2^0}}+2^{2^0}+2^0)} + 2^{2^{2^{2^0}}} + 2^{(2^{2^0}+2^0)} + 2^{2^0}
$$
The "towers" of powers of two are finished as soon as zero is encountered. Isn't that a Beasty Number?
If (natural) powers of two are defined (in Delphi Pascal) as:
function T(N : integer) : integer;
begin
T := 1 shl N;
end;
then we can arrange the outcome of our $666$ experiment as follows:
{ { { { { }} { }} { }} { { { { }}} { { }} { }} { { { { }}}} { { { }} { }} { { }}} = 666
(T(T(T(T(0))+T(0))+T(0)) + T(T(T(T(0)))+T(T(0))+T(0)) + T(T(T(T(0)))) + T(T(T(0))+T(0)) + T(T(0))) = 666
Leading to the following conjecture: the structure of the parentheses
with nesting and adding towers is exactly the same as the structure of the
curly brackets in the corresponding hereditarily finite set representation.
Mathematical note: our definition of a tower function is in agreement with
others, as can be Google'd up with "tower function" and "Maple". We find:
base^^0=1
base^^(height+1)=base^(base^^height)
From which the rest follows. In our case 'base' $= 2$ and 'height' $=$ integer $\ge 0$.