OFFSET
1,4
COMMENTS
The Goldbach Strong Conjecture is true if and only if a(n) = 2n for some n.
Terms are always even numbers because primes present in Goldbach partitions of n > 4 are odd and n = 4 has just one partition (2+2) where difference is 0.
Conjecture: Only first terms are 0 and all further terms are bigger than 0. Excluding a(1), a(n) = 0 iff the only Goldbach partition of 2n is n+n.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
Marcin Barylski, C++ program
Marcin Barylski, Maximum distance for even numbers < 10^6
Eric Weisstein's MathWorld, Goldbach Partition
FORMULA
a(n) = 2 * A047949(n) if A047949(n) > 0 for n >= 2; a(n) = 2n if A047949(n) = -1. - Alois P. Heinz, Jun 01 2020
EXAMPLE
a(1) = 0 for coherence with other related sequences.
a(2) = 0 because 2 * 2 = 4 = 2 + 2 and max_diff = 2 - 2 = 0.
a(8) = 10 because 2 * 8 = 16 = 5 + 11 = 3 + 13 and max_diff = 13 - 3 = 10.
MATHEMATICA
a[1]=a[2]=0;
a[n_]:=Module[{p=3}, While[PrimeQ[2*n-p]!=True, p=NextPrime[p]]; 2*(n-p)];
a/@Range[73] (* Ivan N. Ianakiev, Jun 27 2018 *)
PROG
(PARI) a(n) = if (n==1, 0, forprime(p=2, , if (isprime(2*n-p), return (2*n-2*p)))); \\ Michel Marcus, Jul 02 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Marcin Barylski, Apr 26 2018
STATUS
approved