A290633 Lexicographically earliest sequence of positive integers such that, for any m and n > 0, gcd(a(n), a(n+1)) > 1 and a(n) != a(n+2), and if m < n then a(m) != a(n) or a(m+1) != a(n+1).
2, 2, 4, 4, 2, 6, 3, 3, 6, 2, 8, 4, 6, 6, 4, 8, 2, 10, 4, 12, 2, 14, 4, 10, 2, 12, 3, 9, 6, 8, 8, 6, 9, 3, 12, 4, 14, 2, 16, 4, 18, 2, 20, 4, 16, 2, 18, 3, 15, 5, 5, 10, 6, 12, 8, 10, 5, 15, 3, 18, 4, 20, 2, 22, 4, 24, 2, 26, 4, 22, 2, 24, 3, 21, 6, 10, 8, 12
Offset: 1
Examples
a(1) = 2 is suitable. a(2) = 2 is suitable. a(3) cannot be either 2 (=a(1)) or 3 (gcd(2,3)=1). a(3) = 4 is suitable. a(4) cannot be either 2 (=a(2)) or 3 (gcd(4,3)=1). a(4) = 4 is suitable. a(5) = 2 is suitable. a(6) cannot be 2 (pair (2,2) already seen), 3 (gcd(2,3)=1), 4 (pair (2,4) already seen) or 5 (gcd(2,5)=1). a(6) = 6 is suitable.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program for A290633
- Rémy Sigrist, Scatterplot of the first 10000 pairs of consecutive terms
- Rémy Sigrist, Colorized scatterplot of the first 100000 pairs of consecutive terms
Programs
-
PARI
See Links section.
Comments