Project Euler (C#)

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.

Well, I started solving some of them using C# and the .Net Framework. I’m trying out Mercurial for source control, and you can currently find, look at, download and fork my code at BitBucket.

Since I don’t have any executables, but two assemblies full of tests instead, I run my code inside Visual Studio 2010 using a handy VS Add-In called TestDriven.Net.

Below is a list where you can see what problems I have solved so far. The ones with a link attached are also blogged about.

Problems

1 Add all the natural numbers below one thousand that are multiples of 3 or 5. Solved
2 Find the sum of all the even-valued terms in the Fibonacci sequence which do not exceed four million. Solved
3 Find the largest prime factor of a composite number. Solved
4 Find the largest palindrome made from the product of two 3-digit numbers. Solved
5 What is the smallest number divisible by each of the numbers 1 to 20? Solved
6 What is the difference between the sum of the squares and the square of the sums? Solved
7 Find the 10001st prime. Solved
8 Discover the largest product of five consecutive digits in the 1000-digit number. Solved
9 Find the only Pythagorean triplet, {a, b, c}, for which a + b + c = 1000. Solved
10 Calculate the sum of all the primes below two million. Solved
11 What is the greatest product of four numbers on the same straight line in the 20 by 20 grid? Solved
12 What is the value of the first triangle number to have over five hundred divisors? Solved
13 Find the first ten digits of the sum of one-hundred 50-digit numbers. Solved
14 Find the longest sequence using a starting number under one million. Solved
16 What is the sum of the digits of the number 2^{1000}? Solved
25 What is the first term in the Fibonacci sequence to contain 1000 digits? Solved

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>