OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..3100
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
KEYWORD
nonn
AUTHOR
Robert Israel, Jan 29 2022
STATUS
approved