Archive for the ‘ Mathematics ’ Category
Problem 7 By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10001st prime number? Ah, what a nice, straightforward, unambiguous spec! If only business software specifications were so precise. Way back in problem 3, I took a bit of a wander off-topic [ READ MORE ]
Onwards to… Problem 6 The sum of the squares of the first ten natural numbers is, 12 + 22 + … + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + … + 10)2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten [ READ MORE ]
On to the next Project Euler problem (after a bit of a hiatus)… Problem 5 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? In common with many of [ READ MORE ]
Couple of things to add to yesterday’s post about problem 4. As is so often the case in life, no sooner had I finished the article than I realised there was an obvious additional step I could make, which I’d somehow failed to spot. Regarding the C# solution, an easy win having implemented the Reverse extension [ READ MORE ]
Problem 4 is as follows: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. Bit of an easy one, this. The approach is pretty simple to understand – first calculate [ READ MORE ]