OFFSET
1,2
COMMENTS
Is this a permutation of the positive integers?
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
N:= 2000: # get all terms before the first term > N.
W:= Vector(N, t -> if nops(numtheory:-factorset(t))<=1 then 0 else 1 fi):
WS:= ListTools:-PartialSums(convert(W, list)):
m:= 1:
F:= {2, 3}:
A[1]:= WS[6]:
W[6]:= 0:
for n from 2 do
while W[m] = 0 and m < N do m:= m+1 od;
for k from m to N do
if W[k] = 1 and nops(numtheory:-factorset(k) intersect F) = 2 then
A[n]:= WS[k];
W[k]:= 0;
F:= numtheory:-factorset(k);
break
fi
od;
if k > N then break fi;
od:
seq(A[i], i=1..n-1); # Robert Israel, Nov 23 2015
PROG
(PARI) v246946(nn) = {a = 6; fa = (factor(a)[, 1])~; va = [a]; vs = va; k = 0; while (k!= nn, k = 1; while (!((#setintersect(fa, (factor(k)[, 1])~) == 2) && (! vecsearch(vs, k))), k++); a = k; fa = (factor(a)[, 1])~; va = concat(va, k); vs = vecsort(va); ); va; }
v024619(nn) = {va = []; for (n=1, nn, if (omega(n) >= 2, va = concat(va, n)); ); va; }
lista(nn) = {v = v246946(nn); w = v024619(vecmax(v)); for (k=1, #v, for (j=1, #w, if (w[j] == v[k], print1(j, ", "); break); ); ); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Nov 23 2015
STATUS
approved