login
A345316
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
1, 2, 39, 20, 6, 10, 105, 285, 165, 615, 570, 1482, 1596, 2706, 3885, 14790, 19470, 24090, 19425, 33630, 33558, 80178, 134178, 115878, 151662, 428090, 418938, 631470, 672105, 1366530, 1006278, 1461570, 1155990, 1718310, 2382510, 3344430, 3669090, 4441530, 4562922, 3545178, 6087030, 7945230
OFFSET
0,2
FORMULA
A345300(a(n)) = n.
EXAMPLE
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.
MAPLE
f:= proc(n) local S, p;
S:= {n};
for p in numtheory:-factorset(n) do
S:= S union map(`+`, S, p) union map(`-`, S, p)
od:
nops(select(isprime, S))
end proc:
V:= Array(0..30): count:= 0:
for n from 1 while count < 31 do
v:= f(n);
if v <= 30 and V[v] = 0 then count:= count+1; V[v]:= n fi
od:
convert(V, list);
CROSSREFS
Cf. A345300.
Sequence in context: A263374 A066244 A055689 * A028442 A062982 A042801
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 13 2021
STATUS
approved