52
$\begingroup$

This post discusses the integral, $$I(k)=\int_0^k\pi(x)\pi(k-x)dx$$

where $\pi(x)$ is the prime-counting function. For example, $$I(13)=\int_0^{13}\pi(x)\pi(13-x)dx = 73$$

Using WolframAlpha, the first 50 values for $k=1,2,3,\dots$ are,

$$I(k) = 0, 0, 0, 0, 1, 4, 8, 14, 22, 32, 45, 58, 73, 90, 110, 132, 158, 184, 214, 246, 282, 320, 363, 406, 455, 506, 562, 618, 678, 738, 804, 872, 944, 1018, 1099, 1180, 1269, 1358, 1450, 1544, 1644, 1744, 1852, 1962, 2078, 2196, 2321, 2446, 2581, 2718,\dots$$

While trying to find if the above sequence obeyed a pattern, I noticed a rather unexpected relationship:


Q: For all $n>0$, is it true, $$I(6n+4) - 2\,I(6n+5) + I(6n+6) \overset{\color{red}?}= 0$$

Example, for $n=1,2$, then $$I(10)-2I(11)+I(12)=32-2*45+58 = 0$$ $$I(16)-2I(17)+I(18)=132-2*158+184= 0$$ and so on.

$\endgroup$
  • $\begingroup$ Note your proposed equation doesn't hold for $n = 0$ as $I(4) = 0$, $I(5) = 1$ and $I(6) = 4$. $\endgroup$ – John Omielan Feb 27 at 4:04
  • $\begingroup$ @JohnOmielan: A typo. I meant all $n>0$. I will correct it. $\endgroup$ – Tito Piezas III Feb 27 at 4:09
  • 1
    $\begingroup$ I have checked to confirm what you're asking is true for $n$ up to $18$. However, I have my doubts it'll always work, partially because it doesn't work for $n = 0$. Also, a similar type condition is that $I(6n) - 2I(6n + 1) + I(6n + 2) = 2$, which holds for $1 \le n \le 5$, but at $n = 6$, the LHS becomes $0$ instead. If I get a chance, I will investigate your equation to see if I can figure out why it's true for at least the first $18$ values and, more importantly, will it always stay true. Regardless, though, it's an excellent observation you've made, even if it doesn't always hold. $\endgroup$ – John Omielan Feb 27 at 4:47
  • 5
    $\begingroup$ I checked your result up to $n=533$ (for $n \geq 534$, I have problems. Would you be interested by a huge table of $I(k)$ (I was able to generate it up to $k=540$). This is a very interesting problem. $\endgroup$ – Claude Leibovici Feb 27 at 5:06
  • 1
    $\begingroup$ Up to $k=540$, $I(k)$ is a prime for this list $$\{13,57,119,167,171,173,175,341,395,397,427,431,473,515,519\}$$ $\endgroup$ – Claude Leibovici Feb 27 at 8:13
70
$\begingroup$

The answer is yes. Sketch of solution: $$ I(k) = \int_0^k \sum_{p\le x} \sum_{q\le k-x} 1 \,dx = \sum_p \sum_{q\le k-p} \int_p^{k-q} dx = \sum_p \sum_{q\le k-p} (k-(p+q)) = \sum_{m\le k} r(m)(k-m), $$ where $r(m)$ is the number of ways of writing $m$ as the sum of two primes. Then \begin{align} I(6n+6) &{}-2I(6n+5)+I(6n+4) \\ &= \sum_{m \le 6n+4} r(m)\big((6n+6-m)-2(6n+5-m) +(6m+4-m)\big) + r(6n+5) \\&= 0 + r(6n+5); \end{align} and $r(6n+5)=0$ for every $n\ge1$, since the only way the odd integer $6n+5$ can be the sum of two primes is $6n+5=2+(6n+3)$, but $6n+3=3(2n+1)$ is always composite when $n\ge1$.

The same argument gives $I(6n+2)-2I(6n+1)+I(6n) = r(6n+1)$, which is $2$ if $6n-1$ is prime and $0$ otherwise; this is why (as observed by John Omielan) it equals $2$ for $1\le n\le 5$ but $0$ for $n=6$.

$\endgroup$
  • 15
    $\begingroup$ MSE never ceases to amaze me how fast some people can figure out the answer. $\endgroup$ – Tito Piezas III Feb 27 at 5:21
  • 2
    $\begingroup$ Greg, do you know how to address Ultradark's question regarding when $I(k)$ is prime? $\endgroup$ – Tito Piezas III Feb 27 at 5:31
  • 3
    $\begingroup$ This really surprises me since I thought the equation will be eventually false... $\endgroup$ – Seewoo Lee Feb 27 at 5:36
  • $\begingroup$ @stressedout it's arguably worse due to the HNQ list $\endgroup$ – qwr Feb 28 at 17:39

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.