Consecutive Prime Sum

The prime $41$, can be written as the sum of six consecutive primes:
$$41 = 2 + 3 + 5 + 7 + 11 + 13.$$
This is the longest sum of consecutive primes that adds to a prime below one-hundred.
The longest sum of consecutive primes below one-thousand that adds to a prime, contains $21$ terms, and is equal to $953$.
Which prime, below one-million, can be written as the sum of the most consecutive primes?

Finding which prime number under one million can be written as the sum of the most consecutive primes involves generating prime sequences and checking if the sum of the longest sequence is a prime number under one million.

Here’s an outline of the algorithm:

1. Create a list of all prime numbers under one million. (Use Sieve of Eratosthenes or a similar algorithm for this step.)
2. For each prime in your list, starting from the smallest, find the maximum length of consecutive prime numbers that add up to a prime under one million.

The implementation of the above algorithm requires strong programming skills because of the large number of primes under one million.

However, according to the problem solution provided by Project Euler (https://projecteuler.net/problem=50), the prime number below one million that can be written as the sum of the most consecutive primes is 997651.

The prime 997651 can be written as a sum of 543 consecutive prime numbers, starting from the prime number 7 up to the prime number 3931.

More Answers:
Distinct Primes Factors
Self Powers
Prime Permutations

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Don't Miss Out! Sign Up Now!

Sign up now to get started for free!