login
A351044
a(n) is the least positive number that can be represented in exactly n ways as p*q+r where p,q,r are primes with p<=q and p+q+r prime.
1
1, 7, 16, 28, 40, 62, 76, 118, 136, 190, 182, 202, 304, 256, 266, 362, 376, 436, 388, 502, 526, 556, 706, 586, 822, 808, 762, 1062, 816, 886, 978, 916, 1152, 796, 1242, 976, 1266, 1006, 1216, 1608, 1096, 1582, 1446, 1306, 1356, 1566, 1606, 1816, 1788, 1866, 2032, 1936, 1996, 2206, 2070, 1846, 2556, 2208, 2506, 2566, 2446, 1956, 2476, 2896, 2626, 2826
OFFSET
0,2
LINKS
EXAMPLE
a(3) = 28 because 28 can be represented in exactly 3 ways: 2*13+2, 3*7+7 and 5*5+3, and no smaller number can.
MAPLE
N:= 3000: # for terms <= N
V:= Vector(N):
P:= select(isprime, [2, seq(i, i=3..N, 2)]):
PS:= convert(P, set):
nP:= nops(P):
for i from 1 to nP do
for j from i to nP while P[i]*P[j] < N do
S:= convert(select(`<=`, map(`+`, PS intersect map(`-`, PS, P[i]+P[j]), P[i]*P[j]), N), list);
V[S]:= V[S] +~ 1;
od od:
m:= max(V):
W:= Array(0..m):
for n from 1 to N do
w:= V[n];
if W[w] = 0 then W[w]:= n fi;
od:
W:= convert(W, list):
z:= ListTools:-Search(0, W):
if z <> 0 then W[1..z-1] else W fi;
CROSSREFS
Sequence in context: A028560 A190530 A345071 * A133694 A024627 A211784
KEYWORD
nonn
AUTHOR
Robert Israel, Jan 29 2022
STATUS
approved