OFFSET
1,2
COMMENTS
This sequence is a variant of A127202.
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.
In the scatterplot of the sequence, the prime numbers correspond to the lower line.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A320123
EXAMPLE
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:
n a(n) gcd(a(n-2),a(n-1)) gcd(a(n-1),a(n)) gcd(a(n),a(n-2))
-- ---- ------------------ ---------------- ----------------
1 1 N/A N/A N/A
2 2 N/A 1 N/A
3 3 1 1 1
4 6 1 3 2
5 4 3 2 1
6 9 2 1 3
7 12 1 3 4
8 8 3 4 1
9 15 4 1 3
10 10 1 5 2
11 14 5 2 1
12 5 2 1 5
13 20 1 5 2
14 16 5 4 1
15 25 4 1 5
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 06 2018
STATUS
approved