As a first step I digitalized all pieces seen above. Having an internal representation, I wrote a script which tries all possible rotations and reflections (as three-dimensional rotations can imply two-dimensional reflection) to try and construct a three-dimensional cube from the given pieces. Using short-circuit evaluation to not bother with already impossible solutions, the search space is narrow enough to not require any considerable computing time. The resulting unique solution modulo rotation is shown above; the top face is placed on the bottom right.

]]>Let furthermore be the sequence shift endomorphism represented by the transformation matrix

.

By iteratively applying the sequence shift a closed-form solution for the standard Fibonacci sequence follows.

Diagonalizing leads to eigenvalues and a diagonalization

Using said diagonalization one deduces

Therefore

Thus a closed-form expression not involving any higher-dimensional matrices is found.

To avoid precision errors, I implemented a basic symbolic expression simplifier (fib.hs) — using as a negative-capable root, a symbolic expression is modeled as follows.

data Expr = Sqrt Int | Neg Expr | Expr :+ Expr | Expr :* Expr | Expr :/ Expr | Expr :- Expr | Expr :^ Int deriving Eq

Said model is capable of representing the above derived formula.

phi = (Sqrt 1 :+ Sqrt 5) :/ Sqrt 4 psi = (Sqrt 1 :- Sqrt 5) :/ Sqrt 4 fib n = (Sqrt 1 :/ Sqrt 5) :* (phi :^ n :- psi :^ n)

Using this implementation to calculate the sequence should be possible (assuming the simplifier does not get stuck at any occurring expression), yet takes its sweet time — takes half a minute on my 4 GHz machine.

*Main> simplify $ fib 6 \sqrt{64}

Quicker sequence calculation methods include a brute-force approach, e.g.

import Data.List (transpose) a *@* b = [[sum . map (uncurry (*)) $ zip ar bc | bc <- transpose b] | ar <- a] a *^* 0 = [[1, 0], [0, 1]] a *^* n = a *@* (a *^* (n-1)) fib = (!! 0) . (!! 0) . ([[1, 1], [1, 0]] *^*)

as well as using lazy evaluation to construct the whole infinite sequence.

fibs = [0, 1] ++ [x+y | (x, y) <- zip fibs $ tail fibs]]]>

However, in practice one often only considers a minute subset of the naturals to work with and think about. When writing low-level languages like C, one is nearly forced to forget about almost every natural number — the data type

`u_int_32`

, for example, is only capable of representing .Therefore, it is possible to produce a complete list of every prime representable in thirty-two bits using standard bit pattern interpretation — the entirety of the first primes.

Generating said list took about two minutes on a 4GHz Intel Core i7 using an elementary sieve approach written in C compiled with `gcc -O2`

.

All primes are stored in little-endian format and packed densely together, requiring four bytes each.

Using the resulting file, one can quickly index the primes, for example (using zero-based indexing). Since each prime is stored using four bytes, the prime’s index is scaled by a factor of four, resulting in its byte index.

dd status=none ibs=1 count=4 if=primes.bin skip=40000000 | xxd 00000000: b3cd b10a ....

Source code: intirety.c

Prime list: primes.bin (775.5 MiB)