OFFSET
1,2
COMMENTS
Proof that this is a permutation of the natural numbers follows the same basic format as the proof contained in A098550.
This sequence is one in a multitude of permutations of definable infinite sets (i.e., "infinite permutations") which share similar properties and similar proofs as A098550 (Yellowstone-type), and which are often (though not always - see for example A119718 and A255582) of the general form: a(n) is smallest number not yet appearing in the sequence which is coprime to a(n-1) and not coprime to a(n-2). But caution is warranted here: many sequences which may appear at first glance to be Yellowstone-type infinite permutations are not (e.g., A263648 is infinite, similar in structure to A119718 and even MORE similar to the general Yellowstone form, yet is not a permutation) or may not be provable in similar fashion (e.g., A254077, which is similar in structure to A255582 but cannot be demonstrated as infinite using Yellowstone-type constructions). What observations or generalizations might we draw from this?
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669 [math.NT], 2015.
David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, Journal of Integer Sequences, Vol. 18 (2015), Article 15.6.7
MATHEMATICA
a[n_] := a[n] = If[n <= 4, {1, 2, 3, 5}[[n]], For[k = 4, True, k++, If[CoprimeQ[k, a[n-1]] && !CoprimeQ[k, a[n-2]], If[FreeQ[Array[a, n-1], k], Return[k]]]]]; Array[a, 100] (* Jean-François Alcover, Feb 11 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Bob Selcoe, Oct 22 2015
EXTENSIONS
Corrected and extended by Jean-François Alcover, Feb 11 2019
STATUS
approved