OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers.
EXAMPLE
a(22) = 27 because 27 is the smallest positive integer not occurring among the first 21 terms of the sequence such that a(22)/gcd(a(22), a(21)) = 27/gcd(27, 24) = 9 is not a prime.
a(8) = 5 because 5 is the smallest positive integer not occurring among the first 7 terms of the sequence such that a(8)/gcd(a(8), a(7)) = 5/gcd(5, 10) = 1 is not a prime.
MATHEMATICA
f[l_List] := Block[{k = 1}, While[MemberQ[l, k] || PrimeQ[k/GCD[k, l[[ -1]]]], k++ ]; Append[l, k]]; Nest[f, {1}, 72] (* Ray Chandler, Feb 13 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 09 2007
EXTENSIONS
Extended by Ray Chandler, Feb 13 2007
STATUS
approved