Math

Orion’s Waistline

Orion

One night, while gazing at Orion’s Belt, I wondered what if it was actually a literal belt? Three stars make up Orion’s Belt. They’re definitely not collinear. These stars form the vertices of a gigantic triangle. With some imagination, the perimeter of this triangle is analogous to Orion’s stellar waistline. So how do I calculate it?

Euler #21: Amicable Numbers

How can numbers be amicable? Do they go over to each other’s houses? Do they nod at each other while walking down the street? Probably not. But it is an interesting proposition to find them.

Euler #20: Factorial Digit Sum

Calculating digit sums of really big numbers sounds daunting. But it is not so with Python and its support for really big numbers. I’m talking numbers like 100! Numbers that far exceed the number of atoms in the known universe.

Euler #19: Counting Sundays

Come on in to check out how Doomsday can help us calculate the weekday of a date! The Doomsday algorithm is a neat mental trick you can use to impress your friends.

Euler #18: Maximum Path Sum

Taking paths through triangles is actually more glamorous than it seems. Shortest/longest paths are a common problem in graph theory. And the cool thing about graphs? They’re EVERYWHERE.

Euler #17: Number Letter Counts

English can be annoyingly irregular. One saving grace is its number system. It doesn’t have any special rules beyond 20. Phew! Check out this post that counts letters of English names for numbers.

Euler #16: Power Digit Sum

Python is an awesome language. Humongous numbers such as 2 to the 1000th power are made mincemeat, thanks to Python’s bignum support. Come in to check out this one-liner solution.

Euler #15: Lattice Paths

Imagine you’re stuck in a grid of one-way streets. How many ways are there to get from one corner to the other? What idiot designed such a city?

Euler #14: Longest Collatz Sequence

Proving the Collatz Conjecture is still an unsolved problem of mathematics. This post doesn’t try to do that. Instead, it descends down the tree of a million numbers to the root of all numbers: 1.

Euler #13: Large Sum

The problem itself is very simple. One could even do it by hand. However, it’s tough to do with statically typed languages. Yet it’s a breeze with Python.