login
a(n) is the least k such that there are exactly n primes p <= k such that 2*k-p and p*(2*k-p)+2*k are also prime.
1

%I #58 Sep 05 2022 09:10:42

%S 2,4,11,15,21,35,42,111,81,117,126,60,291,147,225,417,210,330,357,555,

%T 561,375,315,477,735,552,420,975,630,585,816,840,930,1925,1302,1170,

%U 1140,2202,1215,1155,1911,1551,2031,1590,1365,2136,1425,2562,1740,1485,2331,2790,2160,2100,2640,2010,3681,2400,1785,2262,3252,2622,2940,1575,2310,2541,3987,2772

%N a(n) is the least k such that there are exactly n primes p <= k such that 2*k-p and p*(2*k-p)+2*k are also prime.

%C a(n) is the least k such that A356864(k) = n.

%H Robert Israel, <a href="/A356478/b356478.txt">Table of n, a(n) for n = 0..500</a>

%e a(3) = 15 because there are exactly 3 primes p <= 15 with 30-p and p*(30-p)+30 prime, namely 7, 11 and 13, and no smaller number works.

%p f:= proc(n) 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+n) then t:= t+1 fi;

%p od

%p end proc:

%p V:= Array(0..100): V[0]:= 2: count:= 1:

%p for nn from 2 while count < 101 do

%p v:= f(2*nn);

%p if v > 100 then next fi;

%p if V[v] = 0 then count:= count+1; V[v]:= nn; fi;

%p od:

%p convert(V,list);

%Y Cf. A072511, A356864.

%K nonn

%O 0,1

%A _J. M. Bergot_ and _Robert Israel_, Sep 01 2022