Suppose I arrange my (infinite) list of prime numbers in the following way: \begin{array}{c|c}x_i&2&5&11&17&23&31&\cdots\\\hline y_i&3&7&13&19&29&37&\cdots\end{array} so that if $p_k$ denotes the $k$th prime, $x_i$ contains $p_{2k-1}$ and $y_i$ contains $p_{2k}$. Note that $i=1,2,\cdots$.

If $y_i=\hat{\alpha}+\hat{\beta}x_i$ is the line of best fit for these primes, does the intercept $\hat{\alpha}$ converge as $i\to\infty$, and if so, to what value?

First, some preliminary thoughts.

  • Clearly $\hat\beta>1$ since $y_i>x_i$ respectively, but $\epsilon=\hat\beta-1$ will be very small, due to the relatively small difference in $y_i-x_i$.

  • This may have connections with the twin prime conjecture, but this model only cannot capture all the twin primes due to the way they are arranged (for example, the pair $(29,31)$ does not exist here).

  • I have plotted the first $600$ primes and added a best fit line to them. During these additions, the intercept $\hat\alpha$ seems to sway in the interval $(2,4)$. However, this may not show much information as primes get sparser as they get larger, and there would be larger differences between $x_i$ and $y_i$. The plot below shows this; the $R^2$ value of $0.9997$ implies very good fit, and $$\hat\alpha^{(600)}=3.7909,\quad\hat\beta^{(600)}=1.00597.$$ I believe convergence of $\hat\alpha$ is likely as $m\approx1\approx R^2$ consistently.

enter image description here

  • Statistically, we can obtain expressions for the coefficient estimates. $$\hat\beta=\frac{i\sum p_{2k-1}p_{2k}-\sum p_{2k-1}\sum p_{2k}}{i\sum p_{2k-1}^2-(\sum p_{2k-1})^2},\quad\hat\alpha=\frac{\sum p_{2k}-\hat\beta\sum p_{2k-1}}i$$ In a single formula, in terms of $p_{2k}$, $p_{2k-1}$ and $i$ only, $$\hat\alpha=\frac{(i\sum p_{2k-1}^2-(\sum p_{2k-1})^2)\sum p_{2k}-i\sum p_{2k-1}p_{2k}-\sum p_{2k-1}\sum p_{2k}}{i(i\sum p_{2k-1}^2-(\sum p_{2k-1})^2)}$$ although its direct use may be impractical.
  • 1
    $\begingroup$ Nice question(+1) The $109$ th prime is $599$ , sure that the table is correct ($599$ should appear on the left) ? $\endgroup$ – Peter Jan 20 at 17:32

Your Answer

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

Browse other questions tagged or ask your own question.