51

This conjecture is tested for all odd natural numbers less than $10^8$:

If $n>1$ is an odd natural number, then there are natural numbers $a,b$ such that $n=a+b$ and $a^2+b^2\in\mathbb P$.

$\mathbb P$ is the set of prime numbers.

I wish help with counterexamples, heuristics or a proof.


Addendum: As in Greg Martins answer $$k(n)\approx k'(n)=\frac{3}{4}\frac{n}{\ln n} \displaystyle \prod_{\substack{p\equiv1\pmod 4 \\ p\mid n}} \frac{p-1} {p-2}\prod_{\substack{p\equiv3\pmod 4 \\ p\mid n}} \frac {p-1}p$$ which gives the diagram enter image description here where $k$ is the blue curve and $k'$ is the red curve.

Lehs
  • 14,252
  • 4
  • 28
  • 82
  • does the P denote prime? also how do you check till 3000? which software? I am curious to know. – Agile_Eagle Aug 08 '17 at 16:26
  • Which is $\Bbb P$? – InsideOut Aug 08 '17 at 16:26
  • 1
    True for $1<n<10^6$. – rogerl Aug 08 '17 at 16:28
  • Using Mathematica, this function calculates the solution $(i,n-i)$ with $i$ as small as possible. Took about 20 seconds to do all odd numbers below $10^6$. f[n_] := Module[{ret = {}}, Do[ If[PrimeQ[i^2 + (n - i)^2], ret = {i, n - i}; Break[], Continue[]], {i, 1, (n - 1)/2}]; – rogerl Aug 08 '17 at 16:32
  • 3
    true for $n<10^8$ (c++ source) – Dando18 Aug 08 '17 at 16:52
  • 1
    It appears that the number of pairs $(a,b)$ with $a < b$ for which this holds is of the order $\frac{n}{\log n}$. – Hans Engler Aug 08 '17 at 16:55
  • One can further restrict it from being $\Bbb P$ to instead the set of primes which are congruent to $1$ mod4 (an odd prime is equal to the sum of two squares iff it is congruent to 1mod4). This observation might speed up any brute force search if more testing is desired. – JMoravitz Aug 08 '17 at 16:57
  • 1
    Let $k(n)$ be the number of of pairs $(a,b)$ with $a < b$ for which this holds. Here is a histogram of $\frac{k(n) \cdot\log n}{n}$ for $n \le 20,001$ to illustrate this.. https://imagizer.imageshack.us/v2/540x332q90/924/OrMPJK.png – Hans Engler Aug 08 '17 at 17:02
  • 2
    This can be written as the existence (for all odd $n$) of a prime of the form $n^2+2k(n+k)$ for some $k\leq n$. Heuristically, one would expect a number of this size to be prime with probability $\frac {C'}{\ln(n^2)} = \frac C{\ln n}$ (the specific constant here is largely moot); since there are $n$ such numbers, the probability that none of them are prime is roughly $(1-\frac C{\ln n})^n$ $\approx e^{-Cn/\ln n}$, so the expected number of failures is finite (and the bound falls off pretty quickly). – Steven Stadnicki Aug 08 '17 at 17:25
  • 1
    In this form, the question becomes related to the size of the first prime in a (quadratic) sequence and there are probably ties to the Generalized Riemann Hypothesis and Linnik's theorem, but that also suggests that this problem is unsolved and likely to be very challenging indeed. – Steven Stadnicki Aug 08 '17 at 17:30
  • 2
    @StevenStadnicki ...of the form $n^2-2k(n-k)$ – Joffan Aug 08 '17 at 17:34
  • 1
    The conjecture phrased somewhat differently: every odd number can be written in the form $\Re(\pi) + \Im(\pi)$, with $\pi$ a Gaussian prime. – pisco Aug 08 '17 at 17:45
  • 2
    In any case the corresponding primes must be of the form $4m+1$ (Fermat) because the primes of the form $4m-1$ are not representable as a sum of two squares. – Ataulfo Aug 08 '17 at 17:55
  • @Joffan Yes, d'oh - good catch. – Steven Stadnicki Aug 08 '17 at 17:56

3 Answers3

15

Here are some heuristics. As Hans Engler defines, let $k(n)$ be the number of pairs $(a,b)$ with $a<b$ for which $a+b=n$ and $a^2+b^2$ is prime. In other words, $$ k(n) = \#\{ 1\le a < \tfrac n2 \colon a^2 + (n-a)^2 = 2a^2 - 2an + n^2 \text{ is prime} \}. $$ Ignoring issues of uniformity in $n$, the Bateman–Horn conjecture predicts that the number of prime values of an irreducible polynomial $f(a)$ up to $x$ is asymptotic to $$ \frac x{\log x} \prod_p \bigg( 1-\frac1p \bigg)^{-1} \bigg( 1-\frac{\sigma(p)}p \bigg), $$ where $\log$ denotes the natural logarithm and $$ \sigma(p) = \#\{ 1\le t\le p\colon f(t) \equiv 0 \pmod p \}. $$

We now calculate $\sigma(p)$ for $f(a) = 2a^2 - 2an + n^2$. Note that the discriminant of $f$ is $(-2n)^2 - 4\cdot2n^2 = -4n^2$. Therefore if $p$ does not divide $-4n^2$, the number of solutions is given by the Legendre symbol $$ \sigma(p) = 1 + \bigg (\frac{-4n^2}p\bigg) = 1 + \bigg (\frac{-1}p\bigg) = \begin{cases} 2, &\text{if } p\equiv1\pmod 4, \\ 0, &\text{if } p\equiv3\pmod 4. \end{cases} $$ Furthermore, we can check by hand that if $p=2$ then $\sigma(p)=0$, while if $p$ divides $n$ then $\sigma(p)=1$. Therefore our prediction becomes $$ k(n) \approx \frac{n/2}{\log(n/2)} \cdot 2 \prod_{\substack{p\equiv1\pmod 4 \\ p\nmid n}} \frac{p-2}{p-1} \prod_{\substack{p\equiv3\pmod 4 \\ p\nmid n}} \frac p{p-1}. $$ (We're abusing notation: those two products don't individually converge, but their product converges when the primes are taken in their natural order.) In principle that constant could be cleverly evaluated to several decimal places. But for the purposes of experiment, perhaps it's valuable to note that $k(n)$ should be approximately $n/\log n$, times some universal constant, times $$ \prod_{\substack{p\equiv1\pmod 4 \\ p\mid n}} \frac{p-1} {p-2}\prod_{\substack{p\equiv3\pmod 4 \\ p\mid n}} \frac {p-1}p; $$ and so the data can be normalized by that function of $n$ to test for consistency.

Greg Martin
  • 92,241
  • 2
    So there is probably no counterexample but probably very difficult to prove that? – Lehs Aug 08 '17 at 19:21
  • 1
    Can we prove the result for almost every $n$? If not, let $R(x)$ denote the number of $n\leq x$ such that there exists $a,b\geq 0$ with $a+b=n$ and $a^2+b^2$ prime. Then the conjecture states that $R(x)=x$, and the infinitude of the primes of the form $a^2+b^2$ shows that $R(x)\rightarrow\infty$ as $x\rightarrow\infty$. What is the best lower bound we can show for $R(x)$? – Eric Naslund Aug 09 '17 at 00:22
  • 1
    I suspect that since sieve methods will show that the number of such representations for $n$ is at most a constant times the expected number, your argument will already give $R(x) \gg x/\log x$. (PS: conjecturally $R(x) = \frac x2 + O(1)$.) – Greg Martin Aug 09 '17 at 02:16
3

COMMENT.-This is another way, maybe interesting for some people, of stating the same problem.

Given an odd natural number, $2n + 1$, there are $n$ different ways to express it as the sum of two natural $$2n+1=(2n-k)+(k+1);\space k=1,2,....,n$$ Then the problem can be stated as follows equivalently: $$\text{ For all natural 2n+1 greater than 1}\text{ at least one of the n numbers}\\\begin{cases}M_1=4n^2+1\\M_2=(2n-1)^2+2^2\\M_3=(2n-3)^2+3^3\\...........\\...........\\M_n=(n+1)^2+n^2\end{cases}\\ \text{ is a prime}$$

NOTE.- It is known that such a prime (if it exists) is necessarily of the form $p=4m+1$. Besides each $M_k$ has a factorization of the form $$M_k=\prod p_i^{\alpha_i}\prod q_j^{2\beta_j}$$ where $\alpha_i,\space \beta_j$ are non-negative integers,the primes $p_i$ and $q_j$ being of the form $4m+1$ and $4m-1$ respectively.

While larger 2n + 1 is, more likely to exist such a prime number. It would seem that the conjecture is true

Ataulfo
  • 32,657
  • It is clear that in $M_3$ there is a slip and it must be $M_3=(2n-2)^2+3^2$. I prefer to clarify this in a comment rather than edit. – Ataulfo Aug 09 '17 at 15:57
3

One equivalent way to formulate this conjecture is also the following:

For each natural number $n$ we have: $ \displaystyle 0 = \prod_{\underset{\gcd(a,b)=1}{2n+1=a+b}} (\Omega(a^2+b^2)-1)$

This is equivalent as to say that the polynomial $\displaystyle f_n(t) = \prod_{\underset{\gcd(a,b)=1}{2n+1=a+b}} (t-\Omega(a^2+b^2))$ has zero $1$.

where $\Omega$ counts the prime divisors with multiplicity.

Lehs
  • 14,252
  • 4
  • 28
  • 82