The Yellowstone permutation: a(n) = n if n <= 3, otherwise the smallest number not occurring earlier having at least one common factor with a(n-2), but none with a(n-1).

A098550

The Yellowstone permutation: a(n) = n if n <= 3, otherwise the smallest number not occurring earlier having at least one common factor with a(n-2), but none with a(n-1).

Terms

    a(0) =1a(1) =2a(2) =3a(3) =4a(4) =9a(5) =8a(6) =15a(7) =14a(8) =5a(9) =6a(10) =25a(11) =12a(12) =35a(13) =16a(14) =7a(15) =10a(16) =21a(17) =20a(18) =27a(19) =22a(20) =39a(21) =11a(22) =13a(23) =33a(24) =26a(25) =45a(26) =28a(27) =51a(28) =32a(29) =17

External references