login

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”).

a(n) is the first number k such that there are exactly n primes of the form k + A - B where A and B are sums of subsets of the prime factors of k.
1

%I #5 Jun 14 2021 10:00:25

%S 1,2,39,20,6,10,105,285,165,615,570,1482,1596,2706,3885,14790,19470,

%T 24090,19425,33630,33558,80178,134178,115878,151662,428090,418938,

%U 631470,672105,1366530,1006278,1461570,1155990,1718310,2382510,3344430,3669090,4441530,4562922,3545178,6087030,7945230

%N a(n) is the first number k such that there are exactly n primes of the form k + A - B where A and B are sums of subsets of the prime factors of k.

%F A345300(a(n)) = n.

%e a(3) = 20 because there are exactly 3 primes of this form for k=20, namely 13 = 20-2-5, 17 = 20+2-5, and 23 = 20+5-2, and this is the least number for which there are exactly 3 such primes.

%p f:= proc(n) local S, p;

%p S:= {n};

%p for p in numtheory:-factorset(n) do

%p S:= S union map(`+`, S, p) union map(`-`, S, p)

%p od:

%p nops(select(isprime, S))

%p end proc:

%p V:= Array(0..30): count:= 0:

%p for n from 1 while count < 31 do

%p v:= f(n);

%p if v <= 30 and V[v] = 0 then count:= count+1; V[v]:= n fi

%p od:

%p convert(V,list);

%Y Cf. A345300.

%K nonn

%O 0,2

%A _J. M. Bergot_ and _Robert Israel_, Jun 13 2021