HubbleCommand.github.io

Personal blog, project documentation, and ramblings

Recamán Sequence

Posted 26 Dec 2024

tags: math

While I was never particularly great at math, I always liked the subject.

As such, it’s rare for me to see a mathematical topic and be like “yeah, that looks easy”. Recently, one such things happened: a family member showed me the following Numberphile video on the Recamán sequence during christmas:

Seemed easy enough to draw, so I polished off some of my knowledge of p5js (see here for more) and made the following visualisation.

I also made a slightly different variation. Instead of determining if an arc is on top or below the number line by if we are going forwards or backwards, we alternate for each value of an.

px