Category Archives: Project Euler

Project Euler: Problem 25

The Fibonacci sequence is defined by the recurrence relation: , where and . Hence the first 12 terms will be: … The 12th term, , is the first term to contain three digits. What is the first term in the … Continue reading

Posted in Project Euler, Software Development | Tagged , , , | 1 Comment

Project Euler: Problem 16

and the sum of its digits is. What is the sum of the digits of the number ?

Posted in Project Euler, Software Development | Tagged , | Leave a comment

The Sieve of Eratosthenes in C#

In some of the Project Euler problems we have needed a source of primes. One algorithm for finding primes is called the Sieve of Eratosthenes. This algorithm is both pretty simple to understand and to implement. It is also fairly … Continue reading

Posted in Project Euler, Software Development | Tagged , , | Leave a comment

Project Euler: Problem 14

The following iterative sequence is defined for the set of positive integers: (n is even) (n is odd) Using the rule above and starting with 13, we generate the following sequence: It can be seen that this sequence (starting at … Continue reading

Posted in Project Euler, Software Development | Tagged , | Leave a comment

Project Euler: Problem 13

Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629 91942213363574161572522430563301811072406154908250 23067588207539346171171980310421047513778063246676 89261670696623633820136378418383684178734361726757 28112879812849979408065481931592621691275889832738 44274228917432520321923589422876796487670272189318

Posted in Project Euler, Software Development | Tagged , | 2 Comments

Project Euler: Problem 12

The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: … Continue reading

Posted in Project Euler, Software Development | Tagged , | Leave a comment

Project Euler: Problem 11

In the 20×20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 … Continue reading

Posted in Project Euler, Software Development | Tagged | Leave a comment