I was reading something this morning and came across the fact that 28 is both the sum of the first five prime numbers and of the first seven natural numbers. Naturally, I then tried to find other numbers U such that for some integers n and k $$U=\sum_{a=1}^{n}a=\sum_{a=1}^{k}p_a$$ I quickly noticed that 10 is both the sum of the first four natural numbers and of the first three prime numbers, but that I couldn't find any others off the top of my head. After sitting at a computer, I found that the next such number is 133386, which is the sum of the first 516 natural numbers and of the first 217 prime numbers. There were no other examples that for which $k\leq1000$.

Before sitting at the computer, I hypothesized that there were no other examples, and tried to go about proving it. Based on the fact that the sum of the first n natural numbers is $\frac{n(n+1)}{2}$, I was able to proceed: $$\frac{n(n+1)}{2}=U$$ $$n^2+n-2U=0$$ $$n=\frac{-1+\sqrt{1+8U}}{2}$$

Is there any way of proceeding past this point, either proving that there are infinitely many numbers k that $1+8\sum_{a=1}^{k}p_a$ is a perfect square or that there are only a finite number that fulfill this criterion?

  • $\begingroup$ The first five $n$ such that $\frac{n(n+1)}{2}$ is the sum of the first $k$ prime numbers (for some $k$) are $4,7,516,2904,328777$. I haven't determined the corresponding $k$ (for the last two). I'd expect those aren't all, but no idea how one might go about proving such things (and I don't know whether to expect infinitely many). $\endgroup$ – Daniel Fischer Jun 13 '20 at 21:10
  • $\begingroup$ One thing can be considered by looking at the last digit.The sum of those primes couldnot end with 2,4,7,9 for the expression to be square of something. $\endgroup$ – user-492177 Jun 13 '20 at 21:44

You noted that $10$, $28$, and $133386$ were the first three numbers that were initial sums both of primes and of naturals. We can then search Sloane's (the On-line Encyclopedia of Integer Sequences) for those terms and get A066527.

That page reveals that the next terms are $4218060$, $54047322253$, $14756071005948636$, $600605016143706003$, $41181981873797476176$, $240580227206205322973571$, and $1350027226921161196478736$. And since the keyword "more" is listed on the page, it is thought that there are likely more numbers like this to be found, but no proof is given/referenced.

The next term, if it exists, is greater than $6640510710493148698166596$ according to the late Donovan Johnson.

  • $\begingroup$ If the downvoter has criticism or a suggestion I would be happy to hear it either publicly or privately via the email in my profile. $\endgroup$ – Mark S. Jun 14 '20 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.