Euler #12: Highly Divisible Triangular Number
Triangle numbers and beer pong go hand in hand. Finding a highly divisible triangle number could be handy if you had a huge party and wanted to neatly divvy up the cups after a game (ew).
Triangle numbers and beer pong go hand in hand. Finding a highly divisible triangle number could be handy if you had a huge party and wanted to neatly divvy up the cups after a game (ew).
What is the largest product of 4 adjacent numbers of a grid in the 8 compass directions? How do we avoid falling outside of the grid where there dragons be?
In the real world, data is discrete. We can measure things only so often or so finely. This post derives the general form for discrete derivatives and makes a quick ‘n dirty implementation.
We like nice round numbers. We like it even more when these are the solutions to complex equations. We love it when these solutions help find primes. Lattice points on elliptical curves are used in the Sieve of Atkin.
Adding up is fun. It’s even more fun when they’re primes. But, how do we find primes? We use sieves such as the Sieve of Atkin, which is implemented here.
Pythagorean triplets acted as speed squares in ancient carpentry. The Babylonians knew of them before Pythagoras’s time. Euclid’s Formula makes a guest appearance.
Slide open a window and inhale the crisp air of freshly minted products. Of numbers, that is. The exercise is to find the thirteen adjacent digits in a 1000-digit number that have the greatest product.
Is that bearded bald guy really Eratosthenes of Cyrene? Who knows? We do know that he devised the prototypical sieve of prime numbers, put to use here.
Students of math everywhere make this mistake. I know I’ve made it. Have you? You’d be a liar if you say no. The problem pokes gentle fun at this common error.
“Base prime” is a nifty shortcut used here to calculate the least common multiple of a set of numbers. Imagine a giant Venn diagram of overlapping factors.