OFFSET
1,2
COMMENTS
From Robert Israel, Jan 09 2017: (Start)
The set S must contain 1 and all primes p <= n. All semiprimes <= n are then in S*S.
Thus a(n)=a(n-1) if n is a semiprime, and a(n)=a(n-1)+1 if n is prime.
In particular, a(n) >= A000720(n).
Is a(n)/A000720(n) bounded as n -> infinity? (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..3000
Robert Israel, An optimal set S for each n = 1..400
Robert Israel, Code for MATLAB with CPLEX
EXAMPLE
{1,2,3}*{1,2,3} = {1,2,3,4,6,9}, which contains {1,2,3,4}, but no smaller set than {1,2,3} has this property, so a(4) = 3.
MAPLE
N:= 100: # to get a(1) to a(N) makecon:= proc(m) local F, t;
F:= select(t -> t^2 <= m, numtheory:-divisors(m));
subs(Known, add(`if`(t^2=m, X[t], X[t]*X[m/t]), t=F)>=1);
end proc:
P:= {1}:
Known:= {X[1]=1}:
Cons:= {}:
M:= {}:
A[1]:= 1:
V[1]:= {1}:
Ycount:= 0:
for n from 2 to N do
if isprime(n) then
P:= P union {n};
Known:= Known union {X[n] = 1};
A[n]:= A[n-1]+1;
V[n]:= V[n-1] union {n};
elif numtheory:-bigomega(n) = 2 then
A[n]:= A[n-1];
V[n]:= V[n-1];
else
newcons:= makecon(n);
newycons:= NULL;
M:= indets(newcons, `*`);
for t in M do
Ycount:= Ycount+1;
newycons:= newycons, op(1, t) >= Y[Ycount], op(2, t) >= Y[Ycount];
newcons:= subs(t = Y[Ycount], newcons);
od;
Cons:= Cons union {newcons, newycons};
Obj:= convert(select(t -> op(0, t)=X, indets(Cons)), `+`);
Res:= Optimization:-Minimize(Obj, Cons, assume=binary);
A[n]:= Res[1] + nops(P);
V[n]:= select(t -> subs(Res[2], X[t])=1, {$1..n}) union P;
fi
od:
seq(A[i], i=1..N); # Robert Israel, Jan 09 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Sep 20 2011
STATUS
approved