Revision as of 14:30, 28 January 2012 by Lee832 (Talk | contribs)


Problem 1

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.


This is a gentle first problem, but it is designed to illustrate what project Euler is really about.

Recall that story of Little Gauss who was asked by his teacher to add all the digits up to 100. Contrary to the teacher's expectation of enjoying a short respite from nagging of her students who would be busily using their fingers and toes to add up the numbers, Little Gauss came up with the correct answer in matter of seconds. He had found a simple formula for adding the sum of digits up to n. Better yet, his formula could add up all the digits up to 100, 1000, or even 12123897129371927391287 in matter of seconds- it had a constant run time no matter the input n.

We want to approach each problems like our Little Gauss, always looking for more graceful, elegant, and compact solutions.


Naive Approach

Back to Project Euler

Back to MA375

Alumni Liaison

ECE462 Survivor

Seraj Dosenbach