OFFSET
2,2
EXAMPLE
4 = 2+2 and 6 = 3+3. Since those are the only available Goldbach partitions and they have no common prime, a(4/2) = a(2) = 0. 14 = 3+11 and 16 = 5+11, so a(14/2) = a(7) = 11.
MAPLE
S:= proc(n) option remember; {seq((h-> `if`(
andmap(isprime, h), h, [])[])([n+i, n-i]), i=0..n-2)}
end:
a:= n-> max(0, (S(n) intersect S(n+1))[]):
seq(a(n), n=2..80); # Alois P. Heinz, Jun 20 2020
MATHEMATICA
d[n_]:=Flatten[Cases[FrobeniusSolve[{1, 1}, 2*n], {__?PrimeQ}]]
e[n_]:=Intersection[d[n], d[n+1]]; f[n_]:=If[e[n]=={}, 0, Max[e[n]]];
f/@Range[2, 100]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ivan N. Ianakiev, May 21 2020
STATUS
approved