Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A344176
Alternating parity 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), with the condition that the terms in the sequence alternate parity.
2
1, 2, 3, 4, 9, 8, 15, 14, 5, 6, 25, 12, 35, 16, 7, 10, 21, 20, 27, 22, 39, 28, 13, 18, 65, 24, 55, 26, 11, 30, 77, 32, 33, 34, 45, 38, 51, 40, 17, 36, 85, 42, 95, 44, 19, 46, 57, 50, 63, 52, 49, 48, 91, 54, 119, 58, 105, 62, 69, 56, 23, 60, 161, 64, 115, 66
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.
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
Cf. A098550.
Sequence in context: A374612 A098550 A335585 * A256224 A340783 A255509
KEYWORD
nonn
AUTHOR
Enrique Navarrete, May 10 2021
STATUS
approved