Category Archives: Code Tidbits

Project Euler – Problem 35

Problem 35: How many circular primes are there below one million?

Project Euler – Problem 34

Problem 34: Note: 1! + 4! + 5! = 1 + 24 + 120 = 145.

Find the sum of all numbers which are equal to the sum of the factorial of their digits.
Since 1! = 1 and 2! = 2 are not sums they are not included.

Project Euler – Problem 33

Problem 33:
The fraction 49/98 is a curious fraction, as 49/98 = 4/8, obtained by cancelling the 9s.

We shall consider fractions like, 30/50 = 3/5, to be trivial examples.

There are exactly four non-trivial examples of this type of fraction, less than one in value, and containing two digits in the numerator and denominator.

If the product of these four fractions is given in its lowest common terms, find the value of the denominator.

Project Euler – Problem 32

Problem 32: Find the sum of all numbers that can be written as pandigital products.

Project Euler – Problem 31

Problem 31: Given the following coin values: (1p,2p,5p,10p,20p,50p,£1,£2):
Where (1p = 1/£1)
How many different ways can £2 be made using any number of coins?

Project Euler – Problem 30

Problem 30: Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.

Project Euler – Problem 29

Problem 29: How many distinct terms are in the sequence generated by ab for 2 ≤ a ≤ 100 and 2 ≤ b ≤ 100?

Project Euler – Problem 28

Problem 28: 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  6  1  2 11
18  5  4  3 12
17 16 15 14 13

It can be verified that the sum of the numbers on the diagonals is 101.

What is the sum of the numbers on the diagonals in a 1001 by 1001 spiral formed in the same way?

Project Euler – Problem 27

Problem 27: Find the product of the coefficients, a and b, for the quadratic expression that produces the maximum number of primes for consecutive values of n, starting with n = 0 of the form: n² + an + b, where |a| 1000 and |b| 1000,

Project Euler – Problem 26

Problem 26: Find the value of d < 1000 for which 1/d contains the longest recurring cycle in its decimal fraction part.