From b5449eceedbd5d93ea4bd22e604fd972c46eda43 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Tue, 7 Jul 2026 16:44:48 -0500 Subject: Reversible Programming, html formatting changes, and css tweaks --- fib.html | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) (limited to 'fib.html') diff --git a/fib.html b/fib.html index 1d38013..998308e 100644 --- a/fib.html +++ b/fib.html @@ -2,35 +2,13 @@ I accidentally derived a formula for the Fibonacci Sequence + - + -
-

I accidentally derived a formula for the Fibonacci Sequence

-

Published June 11, 2026

-
+
+

Last night my brother pitched me this math problem over dinner (which he later revealed came from this video). It goes something like this:

@@ -71,7 +49,14 @@

Next, since I had no idea how I would go about counting the sequences, I looked at how I could group them, in hoping that would make them easier to count.

Arbitrarily, I decided to group the sequences by how many 2s were in them.

For the 5-stair staircase example, all of the possible sequences of 1s and 2s that sum to 5 look like:

- [1 1 2 1]
[2 1 2]
[1 2 1 1]
[1 1 1 1 1]
[2 1 1 1]
[1 2 2]
[1 1 1 2]
[2 2 1]
+
[1 1 2 1]
+[2 1 2]
+[1 2 1 1]
+[1 1 1 1 1]
+[2 1 1 1]
+[1 2 2]
+[1 1 1 2]
+[2 2 1]

Grouping each sequence by the number of 2s in it yields the table:

@@ -313,6 +298,6 @@

This is the exact same function that appears on ProofWiki!

- + \ No newline at end of file -- cgit v1.3.1