Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Oct 13 2018 02:37:17
%S 1,2,3,6,4,9,12,8,15,10,14,5,20,16,25,30,18,27,22,24,11,33,21,7,36,28,
%T 35,26,40,13,52,32,39,42,34,17,38,68,19,76,44,55,45,48,46,23,50,92,60,
%U 51,56,54,49,63,57,70,66,65,75,69,80,72,78,64,81,84,58
%N a(1) = 1, a(2) = 2, a(3) = 3, and for any n > 3, a(n) = the smallest positive integer not yet in the sequence such that gcd(a(n-2), a(n-1)), gcd(a(n-1), a(n)) and gcd(a(n), a(n-2)) are all distinct.
%C This sequence is a variant of A127202.
%C The sequence is well defined as for any n > 3, provided the first n terms are known, any number v of the form a(n-2) * b where b is coprime to a(n) * a(n-1) satisfies #{ gcd(a(n-1), a(n)), gcd(a(n), v), gcd(v, a(n-1)) } = #{ gcd(a(n-1), a(n)), gcd(a(n), a(n-2)), gcd(a(n-2), a(n-1)) } = 3, and a(n+1) exists.
%C In the scatterplot of the sequence, the prime numbers correspond to the lower line.
%H Rémy Sigrist, <a href="/A320123/b320123.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A320123/a320123.gp.txt">PARI program for A320123</a>
%e The first terms, alongside gcd(a(n-2), a(n-1)), gcd(a(n-1), a(n)) and gcd(a(n), a(n-2)), are:
%e n a(n) gcd(a(n-2),a(n-1)) gcd(a(n-1),a(n)) gcd(a(n),a(n-2))
%e -- ---- ------------------ ---------------- ----------------
%e 1 1 N/A N/A N/A
%e 2 2 N/A 1 N/A
%e 3 3 1 1 1
%e 4 6 1 3 2
%e 5 4 3 2 1
%e 6 9 2 1 3
%e 7 12 1 3 4
%e 8 8 3 4 1
%e 9 15 4 1 3
%e 10 10 1 5 2
%e 11 14 5 2 1
%e 12 5 2 1 5
%e 13 20 1 5 2
%e 14 16 5 4 1
%e 15 25 4 1 5
%o (PARI) See Links section.
%Y Cf. A127202.
%K nonn
%O 1,2
%A _Rémy Sigrist_, Oct 06 2018