Edit 2/8/2010: Updating for recent F# language changes. In our continuing series of how to solve Project Euler problems easily with F#, we now arrive at problem 34 which is defined as: 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.Find the sum of…

# Tag: Project Euler

## Project Euler – Problem 24

Project Euler problem 24 in F# Problem 24 is defined as: A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0,…

## Project Euler in F# – Problem 23

Here is a quick write-up on how to solve Project Euler’s Problem 23 in F#. Problem 23 is defined as follows: A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1…

## Project Euler in F# – Problem 5

Here is a quick write-up on how to solve Project Euler’s Problem 5 in F#. Problem 5 is defined as follows: 2520 is the smallest number that can be divided by each of the numbers 1 to 10 without any remainder. What is the smallest number that is evenly divisible by all of…

## Project Euler in F# – Problem 2

It’s been a few days, so here is Project Euler’s problem 2 in F#. Problem 2 is defined as follows: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34,…

## Project Euler in F# – Problem 1

A while ago I found a wonderful website called Project Euler, which provides a steady stream of interesting mathematical/algorithmic problems to solve. If you are sufficently clever you can potentially solve most problems symbolically with pen and paper. I, however, have been sticking to C# 🙂 With the latest news about baking F# into Visual Studio I…