OFFSET
1,2
COMMENTS
PROG
(PARI) N=99; print1("1, 2, 3"); a=[1, 2, 3, L=4]; unused=[]; v=vector(#a, i, 1); for(n=#a, N, print1(", "a[#a]); for(i=1, #unused, apply(x->gcd(x, unused[i]), a)==v || next; a=concat(vecextract(a, "^1"), unused[i]); unused=vecextract(unused, Str("^", i)); next(2)); L++; while(apply(x->gcd(x, L), a) !=v, unused=concat(unused, L++-1); ); a=concat(vecextract(a, "^1"), L))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jan 18 2011
STATUS
approved