Is the sequence $p_n-n+1$ related to the Goldbach conjecture via the Dirichlet inverse of of the Euler totient?

71 Views Asked by At

I am trying to learn what the Goldbach conjecture is and I therefore ran this Mathematica program where I tried to incorporate the conjecture:

"Mathematica start"
nn = 1000;
a[n_] := Total[Divisors[n]*MoebiusMu[Divisors[n]]]
Table[-Sum[
   If[And[PrimeQ[n] == True, PrimeQ[k] == True, Mod[n + k, 2] == 0], 
    a[GCD[n, k]], 0], {k, 1, n}], {n, 1, nn}]
DeleteCases[%, 0];
Table[Prime[n] - n + 1, {n, 1, nn}][[Range[Length[%]]]];
%% - %
"Mathematica end"

As latex what the program does is:

$$-\sum _{k=1}^n \text{If}[\text{PrimeQ}[n]=\text{True}\land \text{PrimeQ}[k]=\text{True}\land (k+n) \bmod 2=0,a(\gcd (n,k)),0]$$

where $$a(n) = \sum\limits_{d|n} d \cdot \mu(d) \tag{1}$$ is the Dirichlet inverse of the Euler totient function.

$\gcd(n,k)$ is the Greatest Common Divisor.

PrimeQ[5] returns True because 5 is a prime number. Q stands for Query or Question.
PrimeQ[4] returns False because 4 is not a prime number.

$$(k+n) \bmod 2=0$$ means that $(k+n)$ is an even number.

The immediate sequence I get is:

0, 1, 2, 0, 3, 0, 4, 0, 0, 0, 7, 0, 8, 0, 0, 0, 11, 0, 12, 0, 0, 0, \
15, 0, 0, 0, 0, 0, 20, 0, 21, 0, 0, 0, 0, 0, 26, 0, 0, 0, 29, 0, 30, \
0, 0, 0, 33, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 43, 0, 44, 0, 0, 0, 0, \
0, 49, 0, 0, 0, 52, 0, 53, 0, 0, 0, 0, 0, 58, 0, 0, 0, 61, 0, 0, 0, \
0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 76, 0, 77, 0, 0, 0, 80, \
0, 81, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 0, 0, \
0, 100, 0, 0, 0, 0, 0, 105, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, \
0, 116, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 0, 126, 0, 0, 0, 129, 0, 0, \
0, 0, 0, 134, 0, 0, 0, 0, 0, 139, 0, 140,

DeleteCases[%,0] deletes the zeros in the sequence above, and the sequence then becomes:

1, 2, 3, 4, 7, 8, 11, 12, 15, 20, 21, 26, 29, 30, 33, 38, 43, 44, 49, \
52, 53, 58, 61, 66, 73, 76, 77, 80, 81, 84, 97, 100, 105, 106, 115, \
116, 121, 126, 129, 134, 139, 140, 149, 150, 153, 154, 165, 176, 179, \
180, 183, 188, 189, 198, 203, 208, 213, 214, 219, 222, 223, 232, 245, \
248, 249, 252, 265, 270, 279, 280, 283, 288, 295, 300, 305, 308, 313, \
320, 323, 330, 339, 340, 349, 350, 355, 358, 363, 370, 373, 374, 377, \
388, 395, 398, 405, 408, 413, 424, 425, 442, 447, 456, 461, 466, 467, \
472, 481, 486, 491, 492, 497, 502, 505, 506, 517, 526, 527, 530, 535, \
540, 541, 552, 555, 560, 567, 576, 583, 592, 599, 604, 609, 612, 619, \
624, 627, 634, 637, 650, 659, 670, 671, 680, 681, 684, 685, 694, 707, \
710, 711, 714, 727, 730, 731, 734, 753, 756, 763, 772, 779, 782, 787, \
792, 805, 808, 813, 818, 825, 830

Skipping the first term (1) and looking up the sequence in the OEIS we get a match:

https://oeis.org/A014692 A014692(n) = prime(n) - (n-1).

This matches the first 1000 terms of A014692.

Is this a coincidence or is this true for all terms in A014692?

I have the feeling that I have misunderstood the Goldbach conjecture, so I will delete this question if it gets downvoted. Could also be that the entries in the matrix $a(\gcd(n,k))$ are too sparse to be interesting.

1

There are 1 best solutions below

0
On BEST ANSWER

Fort $n\in\mathbb{P}\land n>2$ the sum

$$\sum\limits_{k=1}^{n-1} \left(\left\{\begin{array}{cc} \phi^{-1}(\gcd(n,k)) & n,k\in\mathbb{P}\land (k+n) \bmod 2=0 \\ 0 & \text{otherwise} \\ \end{array}\right.\right)=\pi(n-1)-1\tag{1}$$

counts the number of primes $p\in[3, n-1]$ since for $n,k\in\mathbb{P}$ one has $\phi^{-1}(\gcd(n,k))=\phi^{-1}(1)=1$. Note for $n>2$ the prime $2$ is excluded in this count by the condition $(k+n) \bmod 2=0$.


For $k=n\in\mathbb{P}$ one has $\phi^{-1}(\gcd(n,n))=\phi^{-1}(n)=1-n$.


Therefore for $n\in\mathbb{P}\land n>2$ one has

$$-\sum\limits_{k=1}^n \left(\left\{\begin{array}{cc} \phi^{-1}(\gcd(n,k)) & n,k\in \mathbb{P}\land (k+n) \bmod 2=0 \\ 0 & \text{otherwise} \\ \end{array}\right.\right)=n-\pi(n-1)\tag{2}.$$


Substituting $n\to p_n$ into the right-side of formula (2) above yields

$$p_n-\pi(p_n-1)=p_n-(n-1)\tag{3}$$

which is consistent with the definition of OEIS entry A014692.