# Visual representation of the Fibonacci sequence

The Fibonacci sequence has been fascinating mathematicians since immemorial times: a simple formation with many amazing properties.

This sequence begins with 1 and 1. The other numbers are the sum of the previous two. Hence, the following numbers are:

1 + 1 = 2
3 = 1 + 2
5 = 3 + 2
8 + 5 = 3
and so on.

There is a beautiful way to view this sequence.
Starting with a square of side 1, place another identical square on your side.

The next number is the sum of these two.

And so on.

1, 1, 2, 3, 5, 8, 13, 21, etc …

With 10 squares:

I created two little programs to plot this view.

A Javascript D3, which is a fantastic library for graphics. See interactive project on Github here: https://asgunzi.github.io/Fibonacci/

And another in Excel — VBA, available for download here . Screen print:

VBA is underestimated these days, but it is a language as powerful as all others.

The essence of both plots is not very difficult. In VBA, the command to add a rectangle is as follows.

ActiveSheet.Shapes.AddShape (msoShapeRectangle, x0, y0, side by side) .select

Simply enter the starting position (x, y) and the size of the side.

Then color the interior and the edge.

`With Selection    .ShapeRange(1).Fill.ForeColor.RGB = Information.RGB(200 * Rnd, 200 * Rnd, 200 * Rnd)    .ShapeRange(1).Line.ForeColor.RGB = Information.RGB(0, 0, 0)    .ShapeRange(1).Line.Weight = 1End With`

The inspiration for this little project was the cover of the book “Number Theory”, George Andrews.

Technical ideas with a bit of philosophy: https://ideiasesquecidas.com

Forgotten Math: https://forgottenmath.home.blog/

Project Manager on Analytics and Innovation. “Samurai of Analytics”. Passionate about Combinatorial Optimization, Philosophy and Quantum Computing.

## More from Arnaldo Gunzi

Project Manager on Analytics and Innovation. “Samurai of Analytics”. Passionate about Combinatorial Optimization, Philosophy and Quantum Computing.

## Beyond Awesome Lists

Get the Medium app