Project+Euler

Our Project Euler group consists of Molly, Kayla and Lindsey. We decided to solve Euler problems 17, 20 and 48. The solutions for each of these problems are listed below.

Click the link below to visit the Project Euler website. [|Project Euler]

=__[|Project Euler Problem 17] __= If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? **NOTE:** Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage. ||
 * If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.

__Solution:__
We used Excel to organize and solve this Euler problem. Below is the explanation and the link to the Excel document.

 **Numbers 1-9** First look at the sum of the number of letters in the numbers 1 through 9 because these numbers are used over and over again. This sum is **36.**

**Numbers 10-19** Then look at numbers 10-19. The sum of these is **70**.

**Numbers 20-99** For numbers 20-99 there is a pattern. Each section of ten numbers has the same prefix (for example, twenty, thirty.... before the suffix). Then multiply ten by the number of letters in each number. Add 36 for each set of ten (eight in total). The sum of numbers 20-99 is **748.** <span style="font-family: Georgia,serif;">So the sum of the letters in the numbers 1-99 is **854.**

<span style="font-family: Georgia,serif;">**Numbers 100-999** <span style="font-family: Georgia,serif;">Then look at the numbers 100-999 which also have a pattern. Hundred has 7 letters, so add seven to the number of letters in the number of the hundred (for example: 200(two hundred) is 3+7=10). Then multiply that number by 100 since it will be used 100 times. Then add 3*99*9, this value accounts for the three letters in the word "and" for the numbers 101-999 without counting 200, 300, 400, 500, 600, 700, 800, and 900. Then add 854*9 to account for the numbers 1-99 in each of the 9 hundreds that we have.

<span style="font-family: Georgia,serif;">So for example, 100-199 the total is 2151 letters which comes from (7+3)*100 (the hundreds column)+3*99 (the "ands")+854 (the ones and tens column). Do this same process for all of the hundreds and add them together to get **20259**. Then add that to the previous 854 (numbers 1-99) to get **21113**. For the last number,1000, add 11 letters to the running total which gives you **21,124**.

<span style="font-family: Georgia,serif;">Final total of letters in the numbers 1 to 1000 is **21,124.**

= = =<span style="font-family: Georgia,serif;">Solved by 43,849 =

= = =__<span style="font-family: Georgia,serif;">[|Project Euler Problem 20] __= <span style="font-family: Georgia,serif;">Find the sum of the digits in the number 100! ||
 * <span style="font-family: Georgia,serif;">n! means n*(n-1)*... *2 *1For example, 10! = 10 *9 ...*3*2*1 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.

__<span style="font-family: Georgia,serif;">Solution: __
<span style="font-family: Georgia,serif;">With the assistance of Wolfram Alpha, we were able to find the sum of the digits in the number 100! <span style="font-family: Georgia,serif;">We entered "Find the sum of the digits in the number 100!" into WolframAlpha's solve bar. WolframAlpha then calculated the result for 100! <span style="font-family: Georgia,serif;">Then WolframAlpha counted the number of 0,1,2,...,8,9s in the result of 100!. <span style="font-family: Georgia,serif;">Once the the quantity of each digit is found, the value of each digits is multiplied by the quantity to get the sum of the digits in 100!. <span style="font-family: Georgia,serif;">**The sum of the digits in 100! is 648.** <span style="font-family: Georgia,serif;">[|WolframAlpha Solution] =<span style="font-family: Georgia,serif;">Solved by 66,466 =
 * = <span style="font-family: Georgia,serif;">number of 0s ||= <span style="font-family: Georgia,serif;">30 ||
 * = <span style="font-family: Georgia,serif;">number of 1s ||= <span style="font-family: Georgia,serif;">15 ||
 * = <span style="font-family: Georgia,serif;">number of 2s ||= <span style="font-family: Georgia,serif;">19 ||
 * = <span style="font-family: Georgia,serif;">number of 3s ||= <span style="font-family: Georgia,serif;">10 ||
 * = <span style="font-family: Georgia,serif;">number of 4s ||= <span style="font-family: Georgia,serif;">10 ||
 * = <span style="font-family: Georgia,serif;">number of 5s ||= <span style="font-family: Georgia,serif;">14 ||
 * = <span style="font-family: Georgia,serif;">number of 6s ||= <span style="font-family: Georgia,serif;">19 ||
 * = <span style="font-family: Georgia,serif;">number of 7s ||= <span style="font-family: Georgia,serif;">7 ||
 * = <span style="font-family: Georgia,serif;">number of 8s ||= <span style="font-family: Georgia,serif;">14 ||
 * = <span style="font-family: Georgia,serif;">number of 9s ||= <span style="font-family: Georgia,serif;">20 ||

=__<span style="font-family: Georgia,serif;">[|Project Euler Problem 48] __=

math \\ \text{The series }1^1 + 2^2 + 3^3 +...+ 10^{10} = 10405071317\\ \text{Find the last ten digits of the series, } 1^1 + 2^2 + 3^3 +...+ 1000^{1000}. math

__<span style="font-family: Georgia,serif;">Solution: __
<span style="font-family: Georgia,serif;">To solve this Euler problem, we again used WolframAlpha. We entered "Sum((i^i),i=1,1000)" into the solve bar of WolframAlpha. math \sum_{i=1}^{1000} i^{i} math <span style="font-family: Georgia,serif;">After WolframAlpha calculated the above sum, we simple counted the last ten digits of the solution. math \text{Last ten digits of the series, } 1^1 + 2^2 + 3^3 +...+ 1000^{1000} \text{, are 9110846700} math <span style="font-family: Georgia,serif;">[|WolframAlpha Solution] =<span style="font-family: Georgia,serif;">Solved by 43,293 = = =

=<span style="font-family: Georgia,serif;">Sum of "solved by": 153,608 = = = =<span style="color: #800080; font-family: 'Comic Sans MS',cursive;">Back to home =