# Sum of consecutive prime numbers

Consider that $\mathcal{P}(x)$ represents the $x$-nth prime number.

Let let $y$ be a natural number and $p$ be the prime $\mathcal{P}(y).$ Then let $\mathcal{D}(p)$ the least $n \in \mathbb{N}^*$ which

$\sum\limits_{i = y+1}^{n} \mathcal{P}(i)$

is a prime number. For example:

$\mathcal{D}(2) = 10$, because $\sum\limits_{i = 2}^{10} \mathcal{P}(i) = 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 127$.

For every even number $m > 2$ there exists a prime number $q$ such that $\mathcal{D}(q) = m$?

• Nice little theory :)…… But just to clarify, would $\mathcal{D}(3)$ equal, $\sum_{i=3}^n \mathcal{P}(i)$ for some $n$ or $\sum_{i=2}^n\mathcal{P}(i)$, because $y$ can be natural. I am confused with the $P(y)$ part because you just said the same thing for $x$. – Mr Pie Feb 4 '18 at 6:33
• I think you need something like $n > y+1$ otherwise $n=y+1$ is the trivial solution for all inputs. What $p$ input makes $D(p) = 8$? I don't believe there are any. There are only 6 possible y values, only one of which makes a prime with n=8, and that one isn't the smallest n. – DanaJ Feb 4 '18 at 8:06
• Have you tested this for every $m$ up to 100 or 1000 or something, 674? – Gerry Myerson Feb 4 '18 at 8:22
• Earth to 674, come in please. – Gerry Myerson Feb 5 '18 at 11:41
• @GerryMyerson I tested this for all prime numbers between $2$ and $41161739.$ In this case, all even numbers until $242$ appears at least once. The largest value I found for $\mathcal{D}$ was $350$. – 674123173797 - 4 Feb 6 '18 at 16:26