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
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 13 2021
STATUS
approved