login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A257405
For n=1 or prime, a(n)=n; otherwise, a(n) is the smallest number not already used which shares a factor with a(n-1).
2
1, 2, 3, 6, 5, 10, 7, 14, 4, 8, 11, 22, 13, 26, 12, 9, 17, 34, 19, 38, 16, 18, 23, 46, 20, 15, 21, 24, 29, 58, 31, 62, 28, 30, 25, 35, 37, 74, 32, 36, 41, 82, 43, 86, 40, 42, 47, 94, 44, 33, 27, 39, 53, 106, 48, 45, 50, 52, 59, 118, 61, 122, 54, 51, 57, 60, 67
OFFSET
1,2
COMMENTS
Since limsup(prime(n)) is infinity, it is easy to see that the sequence contains all even numbers. So it is natural to conjecture that the sequence is a permutation of the positive integers.
LINKS
MATHEMATICA
seq={1}; Do[cmplSeq=Complement[Range[2*Max[seq]], seq];
If[PrimeQ[n], AppendTo[seq, n], AppendTo[seq, Min[Select[cmplSeq, GCD[Last[seq], #]>1&]]]], {n, 2, 100}]; seq (* Ivan N. Ianakiev, Apr 25 2015 *)
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 22 2015
EXTENSIONS
More terms from Peter J. C. Moses, Apr 22 2015
STATUS
approved