Blog Archives

Project Euler — problem 10

June 15, 2012
By

Just finish my last assignment for this week. IT’S WEEKEND, officially. Let me take a break to have a look at the tenth problem, another prime problem. It’s no doubt that prime is the center of the number theory and fundamental … Continue reading →

Read more »

Project Euler — problem 9

June 12, 2012
By

Just had supper. My stomach is full of cabbage, carrot and noodle. I’d like to solve the ninth problem to stretch my mind. This one is about Pythagorean theorem. A Pythagorean triplet is a set of three natural numbers, a < b < … Continue reading →

Read more »

Project Euler — problem 8

June 9, 2012
By

The eight problem of Project Euler: Find the greatest product of five consecutive digits in the 1000-digit number. … The solution is as straightforward as the problem, although the 1000-digit number needs some format changes before product calculation. ?View Code … Continue reading →

Read more »

Project Euler — problem 7

June 6, 2012
By

Prime is the core of number theory. Here is an introduction of prime number on Wikipedia. I could only understand roughly half of it. Now, let’s look at the seventh problem of Project Euler, which is another about prime number.  By listing the first six prime numbers: 2, 3, … Continue reading →

Read more »

Project Euler — problem 6

June 2, 2012
By
Project Euler — problem 6

It’s midnight officially. Let me solve the sixth problem before bed. This is a quick one. The sum of the squares of the first ten natural numbers is, 12 + 22 + … + 102 = 385. The square of … Continue reading →

Read more »

Project Euler — problem 5

May 30, 2012
By

I spent around 40 minutes on the last post yesterday, which delayed my bedding time and caused my sleepiness in the morning. So, I’m starting to write earlier tonight. The fifth problem is to calculate the smallest composite for given numbers. 2520 is … Continue reading →

Read more »

Project Euler — problem 4

May 29, 2012
By
Project Euler — problem 4

It’s midnight already. I’m going to bed after I type this. Now the fourth Euler problem: 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 … Continue reading →

Read more »

Project Euler — problem 3

May 27, 2012
By

The third problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? My solvement is straightforward: firstly to identify all the prime numbers between 2 and sqrt(n); secondly … Continue reading →

Read more »

Project Euler — problem 2

May 21, 2012
By

Almost my time for bed. Just write a quick solution on the second problem of Project Euler. Here it is. Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, … Continue reading →

Read more »

R solvements to Project Euler — problem 1

May 15, 2012
By

Things have been going wild since I opened this blog. Tasks were piled up while I was tight on time. At present, I’m facing a major challenge in my life. However, I decide to spare some time for self-improvements. R … Continue reading →

Read more »