Problem #32 is one of the many problems on Project Euler that concerns permutations of strings of text or numbers. The question reads: Project Euler Problem 32: Pandigital products We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit …
Category Archives: Project Euler Problems
Project Euler Problem #31:
Problem #31 is one of the many Project Euler problems that can be efficiently solved with Dynamic Programming. The question reads: Project Euler Problem 31: Coin sums In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, 10p, 20p, 50p, £1 …
Project Euler Problem #30:
Problem #30 concerns numbers which are equal to the sum of powers of their digits. The question reads: Project Euler Problem 30: Digit fifth powers Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 1^4+6^4+3^4+4^4 8208 = 8^4+2^4+0^4+8^4 9474 = 9^4+4^4+7^4+4^4 As 1 …
Project Euler Problem #29:
Problem #29 concerns counting perfect powers. The question reads: Project Euler Problem 29: Distinct powers Consider all integer combinations of a^b for 2≤a≤5 and 2≤b≤5: 2^2 = 4, 2^3 = 8, 2^4 = 16, 2^5 = 32 3^2 = 9, 3^3 = 27, 3^4 = 81, 3^5 = 243 4^2 = 16, 4^3 = 64, …
Project Euler Problem #28:
Problem #28 is the type of counting problem that is very annoying to do legitimately. The question reads: Project Euler Problem 28: Number spiral diagonals Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20 7 8 9 10 19 …
Project Euler Problem #27:
Problem #27 is one of the many problems on Project Euler that concerns prime numbers. Here is the question: Project Euler Problem 27: Quadratic primes Euler discovered the remarkable quadratic formula: n^2 + n + 41 It turns out that the formula will produce 40 primes for the consecutive integer values 0 ≤ n ≤ …
Project Euler Problem #26:
Problem #26 is the first Project Euler problem to feature repeating decimals. The question reads: Project Euler Problem 26: Reciprocal cycles A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given: 1/2 = 0.5 1/3 = 0.(3) 1/4 = 0.25 1/5 = 0.2 …
Project Euler Problem #25:
Problem #25 is yet another problem where having a background in math makes the problem much easier. It is also another question that concerns the Fibonacci sequence. The question reads: Project Euler Problem 25: 1000-digit Fibonacci number The Fibonacci sequence is defined by the recurrence relation: F_n = F_(n-1)+F_(n-2), where F_1 = 1 and F_2 …
Project Euler Problem #24:
Problem #24 is similar to Problem #15 in that they both commonly appear on introductory math competitions such as the AMC 10/12 and Mathcounts. However, unlike Problem #15, this question is pretty annoying. The question reads: Project Euler Problem 24: Lexicographic permutations A permutation is an ordered arrangement of objects. For example, 3124 is one …
Project Euler Problem #23:
Problem #23 is similar to Problem #21 in that it concerns the sum of the proper divisors of numbers as well as abundant numbers. However, Problem #21 discussed amicable numbers which pair abundant numbers with non-abundant numbers while in this question, we are mostly concerned about abundant numbers. The question reads: Project Euler Problem 23: …