%I #12 Sep 06 2022 10:29:20
%S 0,0,0,1,1,1,1,1,1,1,2,1,0,0,3,0,2,3,0,3,4,1,1,2,1,2,3,0,0,3,1,3,1,0,
%T 5,3,0,2,1,0,3,6,0,1,2,1,1,3,0,2,2,0,2,1,1,4,6,0,2,11,0,3,3,0,2,2,0,0,
%U 2,0,4,4,0,1,3,1,5,3,0,2,8,0,2,3,0,1,5,0,0,6,1,4,5,0,3,4,0,3,1
%N a(n) is the number of primes p < n such that 2*n-p and p*(2*n-p)+2*n are also prime.
%C a(n) is the number of k such that n-k, n+k and n^2+2*n-k^2 are all prime.
%C If n == 1 (mod 3) then a(n) <= 1, as the only possible p is 3.
%H Robert Israel, <a href="/A356864/b356864.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%p f:= proc(m) local p,q,t;
%p p:= 1: t:= 0:
%p do
%p p:= nextprime(p);
%p q:= n-p;
%p if q <= p then return t fi;
%p if isprime(q) and isprime(p*q+m) then t:= t+1 fi;
%p od
%p end proc:
%p map(f, 2*[$1..100]);
%t a[n_] := Count[Range[n - 1], _?(AllTrue[{#, 2*n - #, #*(2*n - #) + 2*n}, PrimeQ] &)]; Array[a, 100] (* _Amiram Eldar_, Sep 01 2022 *)
%Y Cf. A061357.
%K nonn
%O 1,11
%A _J. M. Bergot_ and _Robert Israel_, Sep 01 2022