playR

Project Euler — problem 24

November 20, 2012 | Tony

It’s a lovely day. I took a walk around the campus after lunch. The scene was enjoyable in one deep autumn day. Before the afternoon work, I’d like to spend a few moments on the 24th Euler Problem. A permutation is an ordered arrangement of … Continue reading → [Read more...]

Project Euler — problem 23

November 9, 2012 | Tony

Officially, it’s weekend. I’m solving this 23rd Euler problem just before my supper. 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 … Continue reading → [Read more...]

Project Euler — problem 22

November 7, 2012 | Tony

Just had my supper. Stomach is full of stewed beef and potato.  I’d like to solve the 22nd Euler problem before tonight work (right, I’ll work late in my office). Using names.txt (right click and ‘Save Link/Target As…’), a 46K text file containing over … Continue reading → [Read more...]

Project Euler — problem 21

November 3, 2012 | Tony

It’s been over one month since my last post on Euler problem 20, when  I was planning to post at least one on either Euler project or visualization. So I am four posts behind; I’ll try to catch up. Tonight, I’ll solve the 21st Euler … Continue reading → [Read more...]

Project Euler — problem 20

September 23, 2012 | Tony

It’s been quite a while since my last post on Euler problems. Today a visitor post his solution to the second problem nicely, which encouraged me to keep solving these problems. Just for fun! 10! = 10 * 9 * … * 3 * 2 * 1 … Continue reading → [Read more...]

Project Euler — problem 19

September 3, 2012 | Tony

I’ve been working overtime last weekend. Although I suffered little from the Monday syndrome, I still need a break. So, I’m back to the Project Euler after days of Olympic data digging. Today, I’m gonna to solve the 19th problem. You are given the following … Continue reading → [Read more...]

Project Euler — problem 18

August 15, 2012 | Tony

The 18th Euler problem is sorta a route finding problem. It has occupied my mind for two days. Finally I came up to a clever solution. Find the maximum total from top to bottom of the triangle below: 75 95 64 17 … Continue reading → [Read more...]

Project Euler — problem 17

August 8, 2012 | Tony

It has been two weeks since my last post on the 16th Euler problem. Now, since I just need a break after supper, I’m coming the 17th problem. If the numbers 1 to 5 are written out in words: one, … Continue reading → [Read more...]

Project Euler — problem 16

July 21, 2012 | Tony

The 16th problem is another big-number problem: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? This … Continue reading → [Read more...]

Project Euler — problem 15

July 18, 2012 | Tony

The 15th problem in Project Euler. Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 2020 grid? Mmm… walk in the … Continue reading → [Read more...]

Project Euler — problem 14

July 16, 2012 | Tony

It’s Monday today! It’s work day! And I’ve already worked on computer for two hours. Time for a break, which is the 14th problem of Project Euler. The following iterative sequence is defined for the set of positive integers: n n/2 (n … Continue reading → [Read more...]

Project Euler — problem 13

July 9, 2012 | Tony

The 13th in Project Euler is one big number problem: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. Obviously, there are some limits in machine representation of numbers. In R, 2^(-1074) is the smallest … Continue reading → [Read more...]

Project Euler — problem 12

July 7, 2012 | Tony

Going to supper in 20 minutes. I’d like to type down my solution to the 12th Euler problem, just make my time count. The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number … Continue reading → [Read more...]

Project Euler — problem 11

July 2, 2012 | Tony

It’s been a while since I solved one Euler problem last time. Has been busy. Now I’m back and continue to solve the next problem, which is to find the maximum. Let’s take a look at the 11th problem: What … Continue reading → [Read more...]

Project Euler — problem 10

June 15, 2012 | Tony

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 | Tony

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 | Tony

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 | Tony

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 | Tony

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 | Tony

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...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)