# Project Euler Solutions

## Project Euler 12: Highly divisible triangular number

Highly divisible triangular number 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 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, … Let […]

## Project Euler 11: Largest product in a grid

Largest product in a grid problem of project Euler with detailed explaination and code in Java and Python.

## Project Euler 9: Special Pythagorean triplet

Problem A Pythagorean triplet is a set of three natural numbers, a < b < c , for which,a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a+b+c = 1000.Find the product abc. Official Problem Solution Approach In this problem of Special Pythagorean triplet, we

## Project Euler 10: Summation of primes

Summation of primes The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. Official Problem Solution Approach In this problem of Summation of primes till 1 million, we are supposed to find the sum of all the prime

## Project Euler 8: Largest product in a series

Problem The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product? Official Problem Solution Approach In this problem of the Largest

## Project Euler 7: 10001st prime

Problem 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 10001st prime number? Official Problem Solution Approach In this problem of the 10001st prime, we have to find the 10001st prime number. A prime number is a natural

## Project Euler 6: Sum Square Difference

Problem The sum of the squares of the first ten natural numbers is, 12+22+…+102=385 The square of the sum of the first ten natural numbers is, (1+2+…+10)2=552=3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025−385=2640. Find the difference between the

## Project Euler 5: Smallest Multiple

Problem 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 by all of the numbers from 1 to 20? Official Problem Solution Approach In this problem of smallest multiple, we have to find the smallest

## Project Euler 4: Largest palindrome product

Problem 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 the product of two 3-digit numbers. Official Problem Solution Approach In this problem of the Largest palindrome product, we have to find the

## Project Euler 3: Largest prime factor

Problem The prime factors of 13195 are 5, 7, 13, and 29. What is the largest prime factor of the number 600851475143 ? Official Problem Solution Approach In this problem, we are supposed to find the largest prime number which divides the given number. We will use a basic mathematics theorem called the “fundamental theorem