OFFSET
2,3
COMMENTS
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 the difference is 0. a(n) = 0 iff n is prime. - Marcin Barylski, Apr 28 2018
FORMULA
a(n) = 2 * A047160(n). - Alois P. Heinz, Jun 01 2020
MATHEMATICA
a[n_] := For[p=n, True, p--, If[PrimeQ[p]&&PrimeQ[2n-p], Return[2n-2p]]]
PROG
(PARI) a(n) = {forstep(k=n, 1, -1, if (isprime(k) && isprime(2*n-k), return(2*n-2*k)); ); } \\ Michel Marcus, Jun 01 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dean Hickerson, Dec 12 2001
STATUS
approved