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.
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.
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.
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.
Everyone knows the story of the RMS Titanic that sank in 1912 after colliding with an iceberg. 2,224 souls were abroad. At least 1,490 of them went down with it. How do we predict who survived?
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.
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.
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.
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?
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.
The Time Machine by H.G. Wells is one of my favorite science fiction novels. In here, I analyze how he pulled off the difficult feat of scientifically based fantasticism without weirding out the audience too much.