Euler Project: Problem 10 – Python

This weeks covering of the Euler Project: Problem 10 Asks us to simply: Find the sum of all primes below 2 million. Were going to take almost the entire solution for this from our solution to problem 7, where we start out with a generator function to produce our prime numbers, and then use a [...]

Euler Project: Problem 9 – Python

The Euler Project has been a fun way to examine how well we know our programming language of choice. Today we’re covering problem 9 which reads as follows: A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 [...]

Euler Project: Problem 8 – Python

Hello and welcome to our discussion on Euler Project Problem 8. Problem 8 asks us to find the greatest product of five consecutive digits in the 1000-digit number below: 7316717653133062491922511967442657474235534919493 4969835203127745063262395783180169848018694788518 4385861560789112949495459501737958331952853208805 5111254069874715852386305071569329096329522744304 3557668966489504452445231617318564030987111217223 8311362229893423380308135336276614282806444486645 2387493035890729629049156044077239071381051585930 7960866701724271218839987979087922749219016997208 8809377665727333001053367881220235421809751254540 5947522435258490771167055601360483958644670632441 5722155397536978179778461740649551492908625693219 7846862248283972241375657056057490261407972968652 4145351004748216637048440319989000889524345065854 1227588666881164271714799244429282308634656748139 1912316282458617866458359124566529476545682848912 8831426076900422421902267105562632111110937054421 7506941658960408071984038509624554443629812309878 7992724428490918884580156166097919133875499200524 0636899125607176060588611646710940507754100225698 3155200055935729725716362695618826704282524836008 23257530420752963450 Simple enough, were just gonna [...]

Euler Project: Problem 7 – Python

Welcome to this installment of the Euler Project in python. Today we cover problem 7 which asks this question: By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10,001st prime number? For this one we’ll create a prime [...]

Euler Problem: Problem 1 – PHP

Chris has been looking into the Euler Project a bit, from a python perspective, so I thought I’d share some of my equations from a PHP angle, here we go. Euler Project: Problem 1 reads as follows: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, [...]

By on:
Sep
14
2011

Euler Project: Problem 6 – Python

Today’s coverage of the Euler Project looks at problem 6. This is a simple and sweet solution, meaning a short post, meaning less of that magical insight that we strive so hard to provide. Problem 6 of Euler Project asks the following: The sum of the squares of the first ten natural numbers is: 12 [...]

Euler Project: Problem 5 – Python

Welcome to our discussion of Problem 5 of the Euler project. The Euler Project has been an interesting way to explore our understandings of the coding languages we thought we knew so well. Problem 5 inquires the following: 2520 is the smallest number that can be divided by each of the numbers from 1 to [...]

Euler Project: Problem 4 – Python

Today we are covering the Euler Project problem 4. See it in its full glory here. While you’re there sign up and get started! Problem four poses this question: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find [...]

Euler Project: Problem 3 – Python

Today we are covering Problem 3 of the Euler Project found here.The question goes as such: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? This is an interesting one, I started with the sieve of Eratosthenes, and saved it as it works [...]

Euler Project: Problem 2 – Python

We have covered generator functions already, and I’ve actually used a variation of this problem as one of the examples doing so (less the only even numbers part). Anyways our second installment covering Problem 2 of the Euler Project series reads as follows: Each new term in the Fibonacci sequence is generated by adding the [...]