Skip to content

Programming and Plotting Graphs From the Numberphile "Amazing Graphs" Series

License

Notifications You must be signed in to change notification settings

armandwayoff/Amazing-Graphs

Repository files navigation

made-with-python MIT license

$$ \text{\Huge Amazing Graphs} $$

Programming and Plotting Graphs From the Numberphile Amazing Graphs Series

Table of Contents

About the Project

On August 2019, the Numberphile YouTube channel posted a series of three videos in which the mathematician Neil J. A. Sloane presents amazing graphs generated by particular mathematical sequences. I wanted to reproduce these graphs myself and I present the result in this article.

Amazing Graphs trilogy :

  1. Amazing Graphs - Numberphile
  2. Amazing Graphs II (including Star Wars) - Numberphile
  3. Amazing Graphs III - Numberphile

Neil J. A. Sloane is known for having founded the OEIS, a book and then a website on which hundreds of thousands of mathematical sequences are referenced. I strongly encourage you to visit the OEIS website.

How to Use This Code

To run this code, you will need the Matplotlib library. Matplotlib is a complete library for creating static, animated and interactive visualizations in Python.

Installing Matplotlib

You will find all the information necessary for its installation on the following page : https://matplotlib.org/users/installing.html

Presentation of the Sequences

  • A002487 - Stern's Sequence

$$a_0 = 0, \quad a_1 = 1,$$

$$ \forall n \in \mathbb{N}^\star, \begin{cases} a_{2n} &= a_n \\ a_{2n+1} &= a_{n+1} + a_n \end{cases} . $$

Scatterplot of $\mathrm{A}002487(n)$

A002487

Links

OEIS page : https://oeis.org/A002487.
Amazing Graphs III - Numberphile : https://youtu.be/j0o-pMIR8uk.

  • A005185 - Hofstadter's Q Sequence

$$a_1 = a_2 = 1,$$

$$\forall n > 2, a_n = a_{n - a_{n-1}} + a_{n - a_{n-2}}.$$

Scatterplot of $\mathrm{A}005185(n)$

A005185

Links

OEIS page : https://oeis.org/A005185.
Amazing Graphs III - Numberphile : https://youtu.be/j0o-pMIR8uk?t=116.

  • A006577 - Number of Steps for N to Reach 1 in '3n+1' Problem (Bonus)

    ❕ This graph is not presented in Numberphile's trilogy but I still want to share it with you

    Scatterplot of $\mathrm{A}006577(n)$

    A006577

    Links

    OEIS page : https://oeis.org/A006577.
    UNCRACKABLE? The Collatz Conjecture - Numberphile : https://youtu.be/5mFpVDpKX70.

  • A063543 - Wisteria

$$ a_n = n - \text{product of nonzero digits of } n.$$

Scatterplot of $\mathrm{A}063543(n)$

A063543

Links

OEIS page : https://oeis.org/A063543.
Amazing Graphs II (including Star Wars) - Numberphile : https://youtu.be/o8c4uYnnNnc?t=110.

$$a_0 = a_1 = 1,$$

$$ \forall n > 1, \begin{cases} a_n &= a_{n-1} + n + 1 &\text{if $a_{n-1}$ and $n$ are coprime} \\ a_n &= \displaystyle \frac{a_{n-1}}{\mathrm{gcd}(a_{n-1}, n)} &\text{otherwise} \end{cases} . $$

Scatterplot of $\mathrm{A}133058(n)$

A133058

Links

OEIS page : https://oeis.org/A133058.
Amazing Graphs - Numberphile : https://youtu.be/pAMgUB51XZA?t=96.

$$ n\text{-th prime minus its binary reversal}.$$

Scatterplot of $\mathrm{A}265326(n)$

A265326

Links

OEIS page : https://oeis.org/A265326.
Amazing Graphs - Numberphile : https://youtu.be/pAMgUB51XZA?t=469.

License

Distributed under the MIT License. See LICENSE for more information.

About

Programming and Plotting Graphs From the Numberphile "Amazing Graphs" Series

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages