OFFSET
1,8
COMMENTS
Conjecture: a(n) = 0 only when n = 1, 2, 3, 4, 5, 6, 19, 31, 331, 499.
EXAMPLE
a(7) = 1 since only when p = 11 are p - 6, p + 6 and 2n - p all prime.
a(12) = 3 from the cases when p is 11, 13 or 17:
when p = 11, {p - 6, p + 6, 2n - p} = {5, 17, 13} are all prime;
when p = 13, {p - 6, p + 6, 2n - p} = {7, 13, 19, 11} are all prime;
when p = 17, {p - 6, p + 6, 2n - p} = {11, 17, 23, 7} are all prime.
a(19) = 0 since 2n = 38 = 7 + 31 = 19 + 19 = 31 + 7, and none of p = 7, 19, 31 can make p - 6 and p + 6 both prime.
MAPLE
f:= proc(n) local i;
nops(select(p -> andmap(isprime, [p, p-6, p+6, 2*n-p]), [seq(i, i=3..2*n, 2)]))
end proc:
map(f, [$1..100]); # Robert Israel, Oct 13 2024
MATHEMATICA
m = 200; ps = {}; p = 7; While[p = NextPrime[p]; If[PrimeQ[p - 6] && PrimeQ[p + 6], AppendTo[ps, p]]; p < 2*m]; a = {}; Do[ct = 0; k = 0; While[k++; ps[[k]] < n, q = n - ps[[k]]; If[PrimeQ[q], ct++]]; AppendTo[a, ct]; If[ct == 0, AppendTo[b, n]], {n, 2, m, 2}]; a
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Oct 12 2024
STATUS
approved