Kian Broderick

back to all posts

Cool or useful things I learned in math

Published October 14, 2025


Sum of natural numbers

The sum of the natural numbers up to a number nn is n(n+1)/2n(n+1)/2. This is useful in some video/board games with things like poison counters that decrease by one each turn. For example, if you have 30 poison counters where you each turn you take damage and decrease the poison counters, then in total after 30 turns you take 30(30+1)/2=46530(30+1) / 2=465 total damage. You can also multiply this formula by a constant to get the sum of multiples of that constant, since k+2k+3k++nk=k(1+2+3++n)k+2k+3k+\dots+nk=k(1+2+3+\dots+n)

Power sets

In set theory, there is a thing called a power set, which is the set of all possible subsets of a given set. For example, if you have the set S={1,2,3}S=\{1, 2, 3\}, the power set P(S)={,{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}P(S)=\{\emptyset, \{ 1 \},\{ 2 \},\{ 3 \},\{ 1,2 \},\{ 1,3 \},\{ 2,3 \},\{ 1,2,3 \}, where \emptyset represents the set with no elements. You can easily determine the cardinality of the power set with the formula P(S)=2n|P(S)|=2^{n}, where nn is the number of objects in SS. This lets you easily answer questions like how many ways are there to rehearse a string quartet? There are 4 members, so there are 24=162^{4}=16 possible combinations of them (maybe 15 if you remove the empty set).

Squaring two digit numbers

You can easily square two digit numbers in your head with the formula n2=(nd)(n+d)+d2n^{2}=(n-d)(n+d)+d^{2}, and choosing dd to make one of the numbers a multiple of 10. For example, you can do 67 squared by doing

672=(673)(67+3)+32=6470+32=4489\begin{align*} 67^{2}&=(67-3)(67+3)+3^{2} \\ &= 64 \cdot 70+3^{2} \\ &=4489 \end{align*}

Finding the square root of a number

You can accurately approximate the square root of a number by doing one iteration of Newton’s method in your head. The formula for Newton’s method is

x1=x0f(x0)f(x0)x_{1}=x_{0}-\frac{f(x_{0})}{f'(x_{0})}

Using it on a function like f(x)=x2nf(x)=x^{2}-n, where the zeroes of the function are n\sqrt{ n }, you get

x1=x0x02n2x0x_{1}=x_{0}-\frac{x_{0}^{2}-n}{2x_{0}}

So a good improvement on your guess is to subtract the difference of your guess squared and the number divided by twice your guess. In practice it is a lot easier than it seems. To find the square root of 67, you first see that it is close to 64, which is 828^{2}. So you can do

x1=8+676428=8+316=8.1875\begin{align*} x_{1}&=8+\frac{67-64}{2 \cdot 8} \\ &=8+\frac{3}{16} \\ &=8.1875 \end{align*}

8.1875267.035168.1875^{2} \approx 67.03516, which makes this a pretty good guess. Notice you don’t have to worry too much about the signs, since it’s intuitive that your approximation is going to be larger than 8.

Golden ratio

The golden ratio ϕ=1±52\phi=\frac{1 \pm \sqrt{ 5 }}{2} has the property

ϕ1+1=ϕ=ϕ21.\phi^{-1}+1=\phi=\phi^{2}-1 .

Contrapositive

A statement like if XX, then YY, is equivalent to saying if not YY, then not XX. These statements are known as the contrapositive of each other. For example, the Buddhist phrase “No mud, no lotus” is logically equivalent to the profound statement “Mud, lotus”.

Music theory

12-tone music relies on the fact that

321227\frac{3}{2}^{12}\approx 2^{7}

The ratio between these numbers is about 1.01364, and is known as the Pythagorean comma. 32\frac{3}{2} is the ratio of a perfect fifth, and we divide the octave into twelve notes precisely because after twelve perfect fifths you reach a note that is very close to a perfect octave.

Prime number theorem

The number of prime numbers less than a number nn is approximately nlnn\frac{n}{\ln n}. I don’t really know how this one works.