Spiral of Theodorus…

The spiral of Theodorus is a spiral composed of right triangles. Hundreds of years ago, Theodorus of Cyrene constructed continuous right triangles and got a beautiful spiral. He used that spiral to prove that all non-square integers from 3–17 are irrational. How would you plot this spiral? At each step, you need to draw a…

Continua a leggere →

How to generate and read QR Code in Python

QR code is a type of matrix barcode that is machine readable optical label which contains information about the item to which it is attached. In practice, QR codes often contain data for a locator, identifier, or tracker that points to a website or application, etc. Problem Statement : Generate and read QR codes in…

Continua a leggere →

Estimating Pi…

We will be exploring a very interesting, and simple for that matter, application of statistics to help us estimate the value of Pi. For this method, we will be imagining a simple scenario. Imagine for a moment, that we have the unit circle, inside a square. By having the unit circle, we immediately figure out…

Continua a leggere →

Python animations with Matplotlib

In Python, plotting graphs is straightforward — you can use powerful libraries like Matplotlib. It happens, however, that you need to visualize the trend over time of some variables – that is, you need to animate the graphs. Luckily, it’s just as easy to create animations as it is to create plots with Matplotlib. Matplotlib…

Continua a leggere →

A (apparently) simple problem …

So when I say a simple mathematical problem most would think that I am kidding but I am not, there are many unsolved mathematical problems in the world but this is so simple but yet unsolved. The problem is called “3n + 1 problem” or “Collatz conjecture”. To understand the problem first we need to…

Continua a leggere →

Punto fisso

Un punto fisso per una funzione definita da un insieme in sé è un elemento coincidente con la sua immagine. Siano e . è un punto fisso per se $$x=f(x)$$ Si tratta di un punto che la funzione mappa in sé stesso. Con l’ausilio di Python, valutiamo il punto fisso della funzione .

Continua a leggere →

Exponential sums make interesting pictures

Exponential sums are a specialized area of math that studies series with terms that are complex exponentials. Exponential sums also make pretty pictures. If you make a scatter plot of the sequence of partial sums you can get surprising shapes. This is related to the trickiness of estimating such sums: the partial sums don’t simply…

Continua a leggere →