Project Euler: Mathematica Problem #13

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629 91942213363574161572522430563301811072406154908250 23067588207539346171171980310421047513778063246676 89261670696623633820136378418383684178734361726757 28112879812849979408065481931592621691275889832738 44274228917432520321923589422876796487670272189318 47451445736001306439091167216856844588711603153276 70386486105843025439939619828917593665686757934951 62176457141856560629502157223196586755079324193331 64906352462741904929101432445813822663347944758178 92575867718337217661963751590579239728245598838407 58203565325359399008402633568948830189458628227828 80181199384826282014278194139940567587151170094390 35398664372827112653829987240784473053190104293586 ... Continue Reading

Project Euler: Mathematica Problem #12

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + ... Continue Reading

Project Euler: Mathematica Problem #11

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) In the 20×20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 ... Continue Reading

Project Euler: Mathematica Problem #10

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) The sum of the primes below 10 is $Latex2+3+5+7=17.$ Find the sum of all the primes below two million.

  Sum[] returns the sum of a sequence inputed. (similar to ... Continue Reading

Project Euler: Mathematica Problem #9

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) A Pythagorean triplet is a set of three natural numbers, $a<b<c$, for which, For example, $3^2 + 4^2 = 9 + 16 = 25 = 5^2.$ There exists exactly one Pythagorean ... Continue Reading

Project Euler: Mathematica Problem #8

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) Find the greatest product of five consecutive digits in the 1000-digit number. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 ... Continue Reading

Project Euler: Mathematica Problem #7

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number?   ... Continue Reading

Project Euler: Mathematica Problem #6

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) The sum of the squares of the first ten natural numbers is, The square of the sum of the first ten natural numbers is, Hence the difference between the sum of ... Continue Reading

Project Euler: Mathematica Problem #5

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible ... Continue Reading

Project Euler: Mathematica Problem #4

(CAUTION!: This post contains answers. Please close this post and go to Project Euler website if you wish to solve the problem by yourself.) 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 the largest palindrome made from ... Continue Reading