Tag Archives: Project Euler

Project Euler: Problem 6

This is problem 6 on Project Euler: 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, … Continue reading →

Tagged , , | Leave a comment

Project Euler : Problem 5

Problem 5 in Project Euler is this: 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 positive number that is evenly divisible by all … Continue reading →

Tagged , , | Leave a comment

Project Euler : Problem 4

Problem 4 on Project Euler is this: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99. Find the largest palindrome made from the product … Continue reading →

Tagged , , | Leave a comment

Project Euler: Problem 3

Problem 3 on Project Euler is stated thus: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Let us first try an easier problem, finding the largest … Continue reading →

Posted in Uncategorized | Tagged , , | Leave a comment

Checking Prime Numbers

Now that we have a function for generating primes, the next library function we will need is to check whether a given number is prime. The basic method for checking whether a given number n is prime is to use … Continue reading →

Tagged , , | Leave a comment