What is the next nice number?

220 Views Asked by At

For $p_1, p_2, p_3, p_4$ be four consecutive prime numbers, we define $$S(p_1, p_2, p_3, p_4) = p_1^2 + p_2^2 + p_3^2 + p_4^2 .$$ We have now: $$2020 = S(17,19,23,29)$$ $$2692 = S(19,23, 29, 31)$$ $$1348 = S(13, 17, 19, 23)$$ Hence, $$2692 - 2020 = 2020 - 1348.$$ We say 2020 is a nice number. The question is that "What is the next nice number?"

1

There are 1 best solutions below

2
On BEST ANSWER

As mentioned, the problem is equivalent to asking that there are six consecutive primes $p_1, \ldots, p_6$ such that

$$p^2_6 - p^2_5 = p^2_2 - p^2_1.$$

Let's first consider $4$-tuples $[p_6,p_5,p_2,p_1]$ with this property. Let $\Delta = p_2 + p_5 - p_1 - p_6$. Then the required equation becomes, after some algebraic manipulation, equivalent to either of the following:

$$\Delta (\Delta + 2 p_1) = 2(p_6 - p_5)(p_6 - p_2).$$ $$\Delta (\Delta + 2 p_6) = 2(p_5 - p_1)(p_2 - p_1).$$

The RHS is positive so the LHS is positive. It follows that $\Delta \ne 0$, and that both terms on the LHS are either positive or negative.

We first deal with the (easier) case that $\Delta < 0$. It follows that $\Delta + 2 p_1 < 0$, but then

$$p_6 > p_1 + p_2 + p_5.$$

Its not too hard to show that this inequality is never satisfied. For example, it implies that $p_6 > 3p_1$, but there are at least $5$ primes between $(p_1,3p_1)$ for all $p_1 > 7$ by a variation of Bertrand's postulate, and smaller cases can be checked directly. Hence we may assume that $\Delta > 0$.

It follows that

$$2(p_5 - p_1)^2 \ge (p_5 - p_1)(p_2 - p_1) \ge 2 p_6,$$

or that

$$p_5 \ge p_1 + \sqrt{p_6}.$$

This is a huge prime gap. Already the Firoozbakht conjecture predicts that

$$p_{n+1} \le p_n + \log(p_n)^2,$$

which would imply that

$$p_5 \le p_1 + 4 \log(p_4)^2,$$

and since $\sqrt{x} > \log(x)^2$ for $x>6000$ or so, this would be enough (after checking small cases) to prove that there are no more solutions. Note that the Firoozbakht conjecture has been checked for primes up to $2^{64}$, which is quite large; so you won't find any more solutions by a search. OTOH proving such prime gaps is very difficult, even with GRH one only gets $p_{n+1} - p_n \ll p^{1/2}_n \log(p_n)$. Still, almost all models predict that $p^{\epsilon}_n$ is an upper bound for large enough $p_n$ and any $\epsilon$.

Conclusion: $2020$ is most likely the last nice number. Have a good year.