OFFSET
1,11
COMMENTS
a(n) is the number of k such that n-k, n+k and n^2+2*n-k^2 are all prime.
If n == 1 (mod 3) then a(n) <= 1, as the only possible p is 3.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(11) = 2 because 3, 22-3 = 19 and 3*19+22 = 79, and 5, 22-5 = 17 and 5*17+22 = 107 are all prime.
MAPLE
f:= proc(m) local p, q, t;
p:= 1: t:= 0:
do
p:= nextprime(p);
q:= n-p;
if q <= p then return t fi;
if isprime(q) and isprime(p*q+m) then t:= t+1 fi;
od
end proc:
map(f, 2*[$1..100]);
MATHEMATICA
a[n_] := Count[Range[n - 1], _?(AllTrue[{#, 2*n - #, #*(2*n - #) + 2*n}, PrimeQ] &)]; Array[a, 100] (* Amiram Eldar, Sep 01 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Sep 01 2022
STATUS
approved