Giter Club home page Giter Club logo

amazing-graphs's Introduction

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.

amazing-graphs's People

Contributors

armandwayoff avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.