Project Euler
September 24th, 2008
Lately I have been spending a lot of my time on Project Euler. Project Euler is a site with a heap of math problems (209 to be exact) ranging in difficulty. You pick your favourite programming language and try to solve them.
They start of pretty easy:
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
And get very, very hard:
A best approximation to a real number x for the denominator bound d is a rational number r/s (in reduced form) with s
d, so that any rational number p/q which is closer to x than r/s has q
d.
Usually the best approximation to a real number is uniquely determined for all denominator bounds. However, there are some exceptions, e.g. 9/40 has the two best approximations 1/4 and 1/5 for the denominator bound 6. We shall call a real number x ambiguous, if there is at least one denominator bound for which x possesses two best approximations. Clearly, an ambiguous number is necessarily rational.
How many ambiguous numbers x = p/q, 0
x
1/100, are there whose denominator q does not exceed 108?
I’ve done 15 so far. I’ve found that it’s great if your trying to learn a new language. I’m doing mine in python, which I’ve never really used before.
I’m going to start making a few posts about trying to solve them.









Leave a Reply