OFFSET
1,2
COMMENTS
Coincides with the Yellowstone permutation A098550 up to the term a(21).
The primes that appear at the same indices in both sequences are 2,3,5,7 and 13. It seems these are the only ones since due to the alternating parity condition, the primes in a(n) appear at larger indices than in A098550 (however, there are composites that appear at the same indices in both sequences, for example a(47)=57 and a(52)=48).
Even with the alternating parity condition, the primes seem to appear in their natural order as in the Yellowstone permutation (conjecture 8 in A098550), except for 11 and 13, which appear in reverse order.
Unlike the Yellowstone permutation, there seems to be an infinite number of fixed points.
LINKS
MATHEMATICA
Block[{a = Range[3], k}, Do[k = 4; While[Nand[FreeQ[a, k], GCD[a[[-2]], k] > 1, GCD[a[[-1]], k] == 1, UnsameQ @@ Mod[{a[[-1]], k}, 2]], k++]; AppendTo[a, k], {i, 63}]; a] (* Michael De Vlieger, May 14 2021 *)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, May 10 2021
STATUS
approved