Goldbach's Conjecture: Counterexample of "necessary condition"

71 Views Asked by At

Definitions:

Divisor Function: $$\sigma_x(n) = \sum_{d\mid n} d^x$$

Euler's Totient Function:

$$\phi(n) = \# \{m \in \mathbb{Z}^+ \mid (\gcd(m,n)=1) \wedge (1 \le m \le n)\}$$

Conjecture:

The following condition is necessary: If $n \ge 4$ is any even integer, and $p$ is prime such that $\frac{n}{2} + 1 \le p \le n - 2$ and $(p+1) \sigma_1(n-p) - (p-1)\phi(n-p) = 2n$, then $n-p$ has to be prime.

Note:

If $p$ and $q$ are primes such that $p < q$, define $m = pq$. Then $$\frac{\sigma_1(m) - \phi(m)}{2} = p + q$$

Attempt:

I didn't prove any of this, but I created the following algorithm using Matlab, which may work with any even integer $n \ge 2$ entered by the user:

clc; clear; close all;

n = input("Select a positive integer: ");
n = 2*n;
[p, q] = SumOfPrimes(n);

fprintf("The sum of primes of %d is %d + %d\n", n, p, q)
fprintf("%d is prime: %s", q, num2str(isprime(q)))

function [p1,p2] = SumOfPrimes(n)

    if isprime(n/2)
            p1=n/2;
            p2=n/2;
    else

        for p = prevprime(n-2):-2:n/2 + 1
            x = sum(divisors(n-p));
            y = eulerPhi(n-p);
            if isprime(p) && (p+1)*x - (p-1)*y == 2*n
                break
            end
        end
        p1 = p;
        p2 = n - p;
    end

end

Some of you will trigger something in their heads: Yes, it's part of Goldbach's Conjecture. Unfortunately, my program only outputs two primes, $p$ and $q$, so the sum is $2n$, which uses the condition above in Conjecture.

I only want a counterexample of the "necessary" condition stated above, or if impossible, to prove that this is true.

Thanks.