2
$\begingroup$

Let $(p_i)$ be the sequence of prime numbers. Can we solve the equation: $$\sum_{i=1}^k p_i^2=\frac{n(n+1)}{2}$$ in $(k,n)$? Note that $(7,36)$ is solution. Is this the unique solution?

$\endgroup$
4
  • 8
    $\begingroup$ Is there any reason why this particular equation is of interest, and any reason why you believe that is the only solution? $\endgroup$ Commented Jun 13, 2023 at 0:55
  • 2
    $\begingroup$ $(k,n)=(86,3169)$ seems to be another solution $\endgroup$
    – kodlu
    Commented Jun 13, 2023 at 2:39
  • 1
    $\begingroup$ @StanleyYaoXiao The (7,36) solution leads to two well-known formulas for 666. To be sure that's a numerological motivation, not a mathematical one. The gp code k=0;s=0;forprime(p=2,prime(10^7),s+=p^2;k++;if(issquare(8*s+1,&m),print([k,(m-1)/2]))) finds the solutions (7,36) [OP] and (86,3169) [kodlu], and no others up to $10^7$. $\endgroup$ Commented Jun 13, 2023 at 3:07
  • $\begingroup$ Can we prove that there are only two solutions of the equation ? Or is it impossible ? $\endgroup$ Commented Jun 18, 2023 at 8:01

3 Answers 3

7
$\begingroup$

Heuristically, one would expect finitely many solutions: Using $p_i\sim i\cdot\log i$ we get $\sum_{i=1}^kp_i^2\sim \frac{k^3\cdot(\log k)^2}{3}$. The probability that the sum has the form $n(n+1)/2$ is about $\sqrt{\frac{3}{8}}\cdot\frac{1}{k^{3/2}\cdot\log k}$. But the sum over of these numbers for $k\ge2$ is finite, so the expected value of the number of solutions is finite.

Remark: There are no solutions except $k=7$ and $k=86$ for $k\le4\cdot10^9$.

$\endgroup$
2
$\begingroup$

A very similar problem was considered by Cilleruelo and Luca: They showed that the set of positive integers $n$ such that the sum of the first $n$ primes is a square has natural density equal to zero.

Javier Cilleruelo , Florian Luca, ON THE SUM OF THE FIRST n PRIMES, The Quarterly Journal of Mathematics, Volume 59, Issue 4, December 2008, Pages 475–486, https://doi.org/10.1093/qmath/ham055

$\endgroup$
0
$\begingroup$

Not an answer:

If you take logs you obtain that the left hand side equals $$ \sum_{i=1}^k p_i^2 = \frac{p_k^3}{3 \log p_k}+o\left(\frac{p_k^2}{\log x}\right), $$ by a well-known approximation. This must be equal to $$ \frac{n(n+1)}{2} $$ so that one can use the approximations (e.g., by Dusart such as here) to the $k^{th}$ prime $$ p_k \sim k(\log k+ \log \log k-1) $$ to look for a solution for $n$ given $k.$ Thus it seems to me to be very hard to prove that there are only finitely many solutions. More computation may yield further solutions than the ones in comments, extended to a larger range than I did by Noam Elkies.

$\endgroup$
2
  • 2
    $\begingroup$ The first equation gives the product of the primes, not the sum. $\endgroup$ Commented Jun 13, 2023 at 2:57
  • 1
    $\begingroup$ The new equation cannot be right. The main term on the right is smaller than the largest summand on the left. You must mean $p_k^3/(3 \log p_k)$ on the right hand side. $\endgroup$ Commented Jun 13, 2023 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .