Project Euler Problem #47

Problem #47 is one of the many Project Euler problems that involves prime numbers. The problem reads: Project Euler Problem 47: Distinct primes factors The first two consecutive numbers to have two distinct prime factors are: 14 = 2 × 7 15 = 3 × 5 The first three consecutive numbers to have three distinct …

Project Euler Problem #43

Problem #43 is yet another problem that involves digits and primes. This time, we’re looking at pandigital numbers where each subsequence is divisible by a different prime. Here’s the problem: Project Euler Problem 43: Sub-string divisibility The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the …

Project Euler Problem #37

Problem #37 is yet another question on Project Euler that involves manipulating digits in primes. The question reads: Project Euler Problem 37: Truncatable primes The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and …

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 #10:

Problem #10 is an example of how some common functions that are used in certain problems can also be used for other problems down the line. In my post for Problem #7, I discussed the Sieve of Eratosthenes, and I presented an implementation of it in Python 2.7. Perhaps unsurprisingly, this function can be used …

Project Euler Problem #7:

Problem #7 is one of the many problems on Project Euler which concerns prime numbers. The question reads: Project Euler Problem 7: 10001st prime 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? As discussed …

Project Euler Problem #3

While Problem #2 of Project Euler may have featured the very common Fibonacci numbers, Problem #3 is the first to feature the super common prime numbers. Here is the statement of Problem #3: Project Euler Problem 3: Largest Prime Factor The prime factors of 13195 are 5, 7, 13 and 29. What is the largest …

Design a site like this with WordPress.com
Get started