This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A291712 #10 Aug 31 2017 04:47:14 %S A291712 1,1,2,2,1,3,2,4,3,1,4,2,5,3,3,4,1,5,2,3,5,1,6,2,7,5,4,4,5,5,8,6,1,7, %T A291712 2,8,3,9,4,10,5,11,6,3,7,1,8,2,9,5,10,4,11,7,3,6,4,8,1,9,2,10,6,6,5, %U A291712 12,6,11,8,4,7,6,9,1,10,2,6,7,4,6,12,3,11,4 %N A291712 Lexicographically earliest sequence of positive terms such that, for any m and n > 0, if m < n then a(m) != a(n) or a(m+1) != a(n+1), and if n = least k > m such that a(k) = a(m) then m and n have a different parity. %C A291712 If we drop the constraint "if n = least k > m such that a(k) = a(m) then m and n have a different parity" then we obtain the natural numbers interspersed with 1's: 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, ... %C A291712 Conjecturally, (a(n), a(n+1)) uniquely runs over all pairs of positive integers (this is the motivation for this sequence). %C A291712 This sequence has similarities with: %C A291712 - A226005 whose pairs of consecutive terms run over all pairs of positive integers, %C A291712 - A290633 whose pairs of consecutive terms (conjecturally) run over all pairs of noncoprime positive integers. %C A291712 The representation of the first pairs of consecutive terms has nice features. %H A291712 Rémy Sigrist, <a href="/A291712/b291712.txt">Table of n, a(n) for n = 1..10000</a> %H A291712 Rémy Sigrist, <a href="/A291712/a291712.png">Colorized scatterplot of the first 10 000 000 pairs of consecutive terms</a> %H A291712 Rémy Sigrist, <a href="/A291712/a291712.gp.txt">PARI program for A291712</a> %e A291712 a(1) = 1 is suitable. %e A291712 a(2) = 1 is suitable. %e A291712 a(3) cannot equal 1 as the pair (1,1) has already been visited. %e A291712 a(3) = 2 is suitable. %e A291712 a(4) cannot equal 1 as the previous occurrence of 1 happened at even index. %e A291712 a(4) = 2 is suitable. %e A291712 a(5) = 1 is suitable. %e A291712 a(6) cannot equal 1 as the pair (1,1) has already been visited. %e A291712 a(6) cannot equal 2 as the previous occurrence of 2 happened at even index. %e A291712 a(6) = 3 is suitable. %o A291712 (PARI) See Links section. %Y A291712 Cf. A226005, A290633. %K A291712 nonn %O A291712 1,3 %A A291712 _Rémy Sigrist_, Aug 30 2017