Browse by Tags

Related Posts

  • Nested sequences and palindrome numbers

    Problem 4 of Project Euler poses and impractical albeit intriguing problem: given all three digit numbers (100, 101, 102, ..., 998, 999), find the largest product of 2 of those numbers, where the product is a palindrome . For example, 580.085 is the product of two three-digit numbers (995 x 583) but...
    Posted to .NET at 9.400 ft above sea level (Weblog) by Edgar Sánchez on 04-22-2008, 12:00 AM
    Filed under: C#, Functional Programming, C# 3.0, Project Euler
  • Recursive lambdas and sequence aggregations

    The fifth problem at Project Euler proposes this nostalgic primary school exercise: find the smallest quantity that is evenly divisible by some numbers, the least common multiple of 1, 2, 3, ..., 20 to be precise. To begin with, let's remember the old arithmetic formula:   Where gcd is the greatest...
    Posted to .NET at 9.400 ft above sea level (Weblog) by Edgar Sánchez on 04-24-2008, 12:00 AM
    Filed under: C#, Functional Programming, Math, C# 3.0, Project Euler
  • The square of the sum vs. the sum of the squares

    The sixth Project Euler problem poses an exercise that, to me, offers no major hurdles: What is the difference between the sum of the squares and the square of the sums [of a sequence of natural numbers]? The functional C# solution is fairly easy to write and read:     1     ...
    Posted to .NET at 9.400 ft above sea level (Weblog) by Edgar Sánchez on 04-27-2008, 12:00 AM
    Filed under: C#, Functional Programming, C# 3.0, Project Euler
  • Which is the ten thousand first prime?

    Prime numbers have a good deal of practical applications (for example in cryptography) but let's face it, even if they would have none, they would still be the favorite toy of mathematicians . In Problem 7 of Project Euler , we are asked to find the 10001st element of the famous list, my approach was...
    Posted to .NET at 9.400 ft above sea level (Weblog) by Edgar Sánchez on 05-02-2008, 12:00 AM
    Filed under: C#, Functional Programming, LINQ, Math, C# 3.0, Project Euler
  • A cool way to find out whether a number is palindromic

    In this blog entry I proposed a solution to Problem 4 at Project Euler , a crucial element of the problem is to find out whether a number is a palindrome (909 is, 809 isn't), a bit out of laziness and a bit in order to reuse existing methods, I decided to verify the palindrome by converting the number...
    Posted to .NET at 9.400 ft above sea level (Weblog) by Edgar Sánchez on 05-06-2008, 12:00 AM
    Filed under: C#, Functional Programming, F#, C# 3.0, Project Euler
Page 1 of 1 (5 items)
Microsoft Communities