#001 easy

Multiples of 3 and 5

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The ...

#002 easy

Even Fibonacci Numbers

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting w...

#003 easy

Largest Prime Factor

The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 6008...

#004 easy

Largest Palindrome Product

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2...

#005 easy

Smallest Multiple

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any rema...

#006 easy

Sum Square Difference

The sum of the squares of the first ten natural numbers is, $$1^2 + 2^2 + ... + 10^2 = 385.$$ The s...

#007 easy

10001st Prime

By listing the first six prime numbers: $2, 3, 5, 7, 11$, and $13$, we can see that the $6$th prime ...

#008 easy

Largest Product in a Series

The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 =...

#009 easy

Special Pythagorean Triplet

A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, $$a^2 + b^2 = c^2.$$...

#010 easy

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 ...

#011 medium

Largest Product in a Grid

In the 20x20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38...

#012 medium

Highly Divisible Triangular Number

The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle num...

#013 medium

Large Sum

Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. (The 100 nu...

#014 medium

Longest Collatz Sequence

The following iterative sequence is defined for the set of positive integers: - $n \rightarrow n/2$...

#015 medium

Lattice Paths

Starting in the top left corner of a $2 \times 2$ grid, and only being able to move to the right and...

#016 medium

Power Digit Sum

$2^{15} = 32768$ and the sum of its digits is $3 + 2 + 7 + 6 + 8 = 26$. What is the sum of the digi...

#017 medium

Number Letter Counts

If the numbers $1$ to $5$ are written out in words: one, two, three, four, five, then there are $3 +...

#018 medium

Maximum Path Sum I

By starting at the top of the triangle below and moving to adjacent numbers on the row below, the ma...

#019 medium

Counting Sundays

You are given the following information, but you may prefer to do some research for yourself. - 1 J...

#020 medium

Factorial Digit Sum

$n!$ means $n \times (n - 1) \times \cdots \times 3 \times 2 \times 1$. For example, $10! = 10 \tim...

#021 hard

Amicable Numbers

Let $d(n)$ be defined as the sum of proper divisors of $n$ (numbers less than $n$ which divide evenl...

#022 hard

Names Scores

Using [names.txt](https://projecteuler.net/resources/documents/0022_names.txt), a 46K text file cont...

#023 hard

Non-Abundant Sums

A perfect number is a number for which the sum of its proper divisors is exactly equal to the number...

#024 hard

Lexicographic Permutations

A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of...

#025 hard

1000-digit Fibonacci Number

The Fibonacci sequence is defined by the recurrence relation: $F_n = F_{n - 1} + F_{n - 2}$, where ...

#026 hard

Reciprocal Cycles

A unit fraction contains $1$ in the numerator. The decimal representation of the unit fractions with...

#027 hard

Quadratic Primes

Euler discovered the remarkable quadratic formula: $n^2 + n + 41$ It turns out that the formula wi...

#028 hard

Number Spiral Diagonals

Starting with the number $1$ and moving to the right in a clockwise direction a $5$ by $5$ spiral is...

#029 hard

Distinct Powers

Consider all integer combinations of $a^b$ for $2 \le a \le 5$ and $2 \le b \le 5$: $$ \begin{array...

#030 hard

Digit Fifth Powers

Surprisingly there are only three numbers that can be written as the sum of fourth powers of their d...

#031 hard

Problem 31

In the United Kingdom the currency is made up of pound (£) and pence (p). There are eight coins in g...

#032 hard

Problem 32

Pandigital Products We shall say that an n-digit number is pandigital if it makes use of all the dig...

#033 hard

Problem 33

Digit Cancelling Fractions The fraction 49/98 is a curious fraction, as an inexperienced mathematici...

#034 hard

Digit Factorials

$145$ is a curious number, as $1! + 4! + 5! = 1 + 24 + 120 = 145$. Find the sum of all numbers whic...

#035 hard

Circular Primes

The number, $197$, is called a circular prime because all rotations of the digits: $197$, $971$, and...

#036 hard

Double-base Palindromes

The decimal number, $585 = 1001001001_2$ (binary), is palindromic in both bases. Find the sum of al...

#037 hard

Truncatable Primes

The number $3797$ has an interesting property. Being prime itself, it is possible to continuously re...

#038 hard

Pandigital Multiples

Take the number $192$ and multiply it by each of $1$, $2$, and $3$: $$\begin{align} 192 \times 1 &=...

#039 hard

Integer Right Triangles

If $p$ is the perimeter of a right angle triangle with integral length sides, $\{a, b, c\}$, there a...

#040 hard

Champernowne's Constant

An irrational decimal fraction is created by concatenating the positive integers: $$0.12345678910{\c...

#041 hard

Pandigital Prime

We shall say that an $n$-digit number is pandigital if it makes use of all the digits $1$ to $n$ exa...

#042 hard

Coded Triangle Numbers

The $n$<sup>th</sup> term of the sequence of triangle numbers is given by, $t_n = \frac12n(n+1)$; so...

#043 hard

Sub-string Divisibility

The number, $1406357289$, is a $0$ to $9$ pandigital number because it is made up of each of the dig...

#044 hard

Pentagon Numbers

Pentagonal numbers are generated by the formula, $P_n=n(3n-1)/2$. The first ten pentagonal numbers a...

#045 hard

Triangular, Pentagonal, and Hexagonal

Triangle, pentagonal, and hexagonal numbers are generated by the following formulae: Triangle: T_n ...

#046 hard

Goldbach's Other Conjecture

It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a...

#047 hard

Distinct Primes Factors

The first two consecutive numbers to have two distinct prime factors are: - 14 = 2 × 7 - 15 = 3 × 5...

#048 hard

Self Powers

The series, $1^1 + 2^2 + 3^3 + \cdots + 10^{10} = 10405071317$. Find the last ten digits of the ser...

#049 hard

Prime Permutations

The arithmetic sequence, $1487, 4817, 8147$, in which each of the terms increases by $3330$, is unus...

#050 hard

Consecutive Prime Sum

The prime $41$, can be written as the sum of six consecutive primes: $$41 = 2 + 3 + 5 + 7 + 11 + 13...

#051 hard

Prime digit replacements

By replacing the 1st digit of the 2-digit number *3, it turns out that six of the nine possible valu...

#052 medium

Permuted multiples

It can be seen that the number, $125874$, and its double, $251748$, contain exactly the same digits,...

#053 medium

Combinatoric selections

There are exactly ten ways of selecting three from five, 12345: 123, 124, 125, 134, 135, 145, 234, ...

#054 hard

Poker hands

In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the...

#055 medium

Lychrel numbers

If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. Not all numbers produce palind...

#056 medium

Powerful digit sum

A googol (10^100) is a massive number: one followed by one-hundred zeros; 100^100 is almost unimagin...

#057 medium

Square root convergents

It is possible to show that the square root of two can be expressed as an infinite continued fractio...

#058 medium

Spiral primes

Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length ...

#059 medium

XOR Decryption

Each character on a computer is assigned a unique code and the preferred standard is ASCII (American...

#060 hard

Prime pair sets

The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them...

#061 hard

Cyclical Figurate Numbers

Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygon...

#062 medium

Cubic Permutations

The cube, $41063625$ ($345^3$), can be permuted to produce two other cubes: $56623104$ ($384^3$) and...

#063 medium

Powerful Digit Counts

The $5$-digit number, $16807=7^5$, is also a fifth power. Similarly, the $9$-digit number, $13421772...

#064 hard

Odd Period Square Roots

All square roots are periodic when written as continued fractions and can be written in the form: $...

#065 medium

Convergents of e

The square root of 2 can be written as an infinite continued fraction. $$\sqrt{2} = 1 + \dfrac{1}{2...

#066 very-hard

Diophantine Equation

Consider quadratic Diophantine equations of the form: $$x^2 - Dy^2 = 1$$ For example, when $D=13$,...

#067 easy

Maximum Path Sum II

By starting at the top of the triangle below and moving to adjacent numbers on the row below, the ma...

#068 medium

Magic 5-gon Ring

Consider the following "magic" 3-gon ring, filled with the numbers 1 to 6, and each line adding to n...

#069 easy

Totient Maximum

Euler's totient function, φ(n) [sometimes called the phi function], is defined as the number of posi...

#070 hard

Totient Permutation

Euler's totient function, $\phi(n)$ [sometimes called the phi function], is used to determine the nu...

#071 easy

Ordered Fractions

Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\ope...

#072 hard

Counting Fractions

Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\ope...

#073 hard

Counting Fractions in a Range

Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\ope...

#074 easy

Digit Factorial Chains

The number $145$ is well known for the property that the sum of the factorial of its digits is equal...

#075 hard

Singular Integer Right Triangles

It turns out that **12 cm** is the smallest length of wire that can be bent to form an integer sided...