Posts

Showing posts from October, 2025

Following in Gauss's footsteps : Computing the Sum of the First n Positive Integers

Image
What if we want to compute the following sums for which $n$ is a positive integer. $$ \sum_{k=1}^{n} k = 1+2+3+\cdots+n $$ $$ \sum_{k=1}^{n} k^2 = 1^2+2^2+3^2+\cdots+n^2 $$ $$ \sum_{k=1}^{n} k^3 = 1^3+2^3+3^3+\cdots+n^3 $$ You can just power your way through it by brute forcing this sum, but for a large amount of $n$ this might become very difficult. Maybe there is something smarter we can do right? Well, the same thought went through Gauss’s head. Gauss, the mathematical prodigy Germany in the $1780$s, a bunch of children are sitting in a classroom. The teacher just gave the entire class the tedious assignment of summing the first $100$ integers. In other words, he wanted the children to compute: $$ \sum_{k=1}^{100} k = 1+2+3+\cdots+100 $$ The teacher hoped that this exercise would keep the kids busy for half an hour, but a young Gauss was quick to answer that the sum’s value is $5\,050$. This was only a glimpse of the pure genius of Gauss. However, he was no literal ...

To divide or not to divide by 3?

Image
Last summer, I was watching a quiz show on TV. It is always to shout answers from your couch like you’re part of the team. It’s harmless fun and a great way to feel smarter than you probably are. Then suddenly, a math question appeared. It was my moment to shine. Both teams had to decide, from a list of numbers, which ones were divisible by $3$. Now, there are a few ways to test that. The obvious one is just to divide the number by $3$ and see if it works, but that wasn’t what the quizmasters were looking for. They wanted an insight such that you can see it quicker. The teams had to bid on how many correct answers they could give. The team that bid the highest number of answers got to play but if they got one wrong, the other team would steal the points obtained by the other team. By pure coincidence, I actually knew someone on one of the teams. Obviously I was rooting for my friend’s team and the main reason why I kept watching in the first place. His team got the opportunity...

Measuring the Distance to a Thunderstorm using your Ears

Image
As a child I often heard the rule of thumb: "When you want to know how far a storm is you should count the seconds between lightning and thunder and then divide by 3 to obtain the distance in kilometres." My goal today is to check if this is really true. The lightspeed is determined to be $c = 3 \cdot 10^{8}\ m/s$. The speed of sound in dry air at 20° C is $v_{s} = 343\ m/s\ = 0,343\ km/s$. As a result, the following equations hold where $\Delta t_{l}$ and $\Delta t_{s}$ are the respective times that the light needs to reach us: $$c = \frac{\Delta x}{\Delta t_{l}},\ v_{s} = \frac{\Delta x}{\Delta t_{s}}$$ As we do not have any idea of where the storm is, we can only measure the time $\Delta t_{m}$ from the occurrence of the lightning until the moment we hear the thunder. $$\Delta t_{m} = \Delta t_{s} - \Delta t_{l}$$ As an approximation, we assume that the time the lightning needs to reach us is much smaller than the time the sound needs to reach us. $$\Delta t...

Cooking Up Your OWN Square Roots at Home

Image
Some readers of the blog reached out to me about the post of the square-root. They pointed out I forgot that I forgot to introduce a famous ancient idea to approximate any square root $\sqrt{S}$. The first explicit algorithm for approximating is known as Heron's method. The method is named after the first-century Greek mathematician Hero of Alexandria who described the method in his work Metrica. This method is also called the Babylonian method but although there is no evidence that the method was known to Babylonians. In addition, the method is not to be confused with the Babylonian method for approximating hypotenuses which is also a way of approximating roots. However, Heron’s method is a pretty neat trick to approximate the square root with astonishing precision. For a very old idea it works very well. The idea of Hero of Alexandria is actually pretty elegant. Assume you have a rectangle with sides of length $a$ and $b$ and an area of $S$. Then you can just choose a sid...

Why Dividing by Zero Breaks Math and Teachers Warn You for it

Image
From a young age, we all learn in school that you can’t divide by zero. It is often treated as a mortal sin in math class. However, teachers usually say it’s undefined and move on. But why is it forbidden? Why is dividing by zero so dangerous that math itself breaks down if we try it? The goal of this post is to clear out the confusion about dividing by zero. So let’s start from the very basics. We all know that division is the opposite of multiplication. From algebra class, we can say that $6$ divided by $3$ is $2$ because $3\times 2=6$. It becomes more difficult if we ask what is $5$ divided by $0$, we’re really asking what number times $0$ equals $5$. But since $0 \times n = 0$ for every number $n$, we cannot answer this question easily. Let’s see it in another way, suppose you have baked a complete cake and you want to know how large of a piece each person gets. You have a cake of size $1$ and $N$ guests at your party. This means that each person will get $\frac{1}{N}$ of ...