%I #9 Oct 02 2022 13:29:33
%S 4,6,7,8,9,11,13,19,24,29,31,34,39,41,44,52,59,69,73,74,81,84,96,97,
%T 102,103,107,108,113,115,118,119,120,129,135,145,153,160,164,182,207,
%U 212,230,236,243,261,264,277,285,299,306,329,337,340,342,347,358,379,386,397,410,415,420,428,434
%N Numbers k such that the sum of (q mod p) for pairs of primes p<q such that p+q=2*k is prime.
%C Numbers k such that A338984(k) is prime.
%H Robert Israel, <a href="/A357122/b357122.txt">Table of n, a(n) for n = 1..2000</a>
%e a(5) = 9 is a term because 2*9 = 5 + 13 = 7 + 11 with (13 mod 5) + (11 mod 7) = 3 + 4 = 7. which is prime.
%p N:= 2000: # for terms <= N/2
%p P:= select(isprime, [seq(i, i=3..N, 2)]):
%p nP:= nops(P):
%p V:= Vector(N):
%p for i from 1 to nP do
%p for j from i+1 to nP do
%p v:= P[i]+P[j];
%p if v > N then break fi;
%p V[v]:= V[v] + (P[j] mod P[i])
%p od od:
%p select(t -> isprime(V[2*t]), [$1..N/2]);
%Y Cf. A338984.
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Sep 12 2022