Problem Archive

Let $p(t)$ denote the $(t+1)$th prime number. So that $p(0) = 2$, $p(1) = 3$, etc.
We define the prime score of a list of nonnegative integers $[a_1, \dots, a_n]$ as the sum $\sum_{i = 1}^n p(a_i)$.
Let $M(k, n)$ be the maximal prime score among all lists $[a_1, \dots, a_n]$ such that:

For example, $M(2, 5) = 14$ as $[0, 1, 1, 1, 1]$ attains a maximal prime score of $14$.

Find $M(7000, p(7000))$.

Solution
No solution yet. Write yours at solutions/s874.md.
Problems sourced from Project Euler · Non-commercial & educational use only · CC BY-NC-SA 4.0