Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Oct 03 2022 08:45:15
%S 3,5,11,13,11,19,53,17,29,467,59,23,41,29,173,31,197,4877,59,41,151,
%T 67,71,47,751,79,53,661,59,89,61,97,101,103,71,109,73,193,113,199,461,
%U 83,1361,223,137,3331,139,2297,149,101,257,1531,107,163,1621,397,751,997,113,7741,181,313,191,193
%N a(n) is the first prime p such that (p+q)/(2*n) is prime, where q is the next prime after p.
%H Robert Israel, <a href="/A357369/b357369.txt">Table of n, a(n) for n = 2..10000</a>
%e a(4) = 11 because (11+13)/(2*4) = 3 is prime, and no smaller prime works.
%p V:= Vector(100): count:= 0:
%p q:= 3:
%p while count < 99 do
%p p:= q; q:= nextprime(q);
%p m:= (p+q)/2;
%p for r in numtheory:-factorset(m) do
%p v:= m/r;
%p if v <= 100 and V[v] = 0 then
%p count:= count+1; V[v]:= p;
%p fi
%p od
%p od:
%p convert(V[2..100],list);
%Y Cf. A357373.
%K nonn
%O 2,1
%A _Robert Israel_, Sep 25 2022