cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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, 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, 12, 6, 11, 8, 4, 7, 6, 9, 1, 10, 2, 6, 7, 4, 6, 12, 3, 11, 4
Offset: 1

Views

Author

Rémy Sigrist, Aug 30 2017

Keywords

Comments

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, ...
Conjecturally, (a(n), a(n+1)) uniquely runs over all pairs of positive integers (this is the motivation for this sequence).
This sequence has similarities with:
- A226005 whose pairs of consecutive terms run over all pairs of positive integers,
- A290633 whose pairs of consecutive terms (conjecturally) run over all pairs of noncoprime positive integers.
The representation of the first pairs of consecutive terms has nice features.

Examples

			a(1) = 1 is suitable.
a(2) = 1 is suitable.
a(3) cannot equal 1 as the pair (1,1) has already been visited.
a(3) = 2 is suitable.
a(4) cannot equal 1 as the previous occurrence of 1 happened at even index.
a(4) = 2 is suitable.
a(5) = 1 is suitable.
a(6) cannot equal 1 as the pair (1,1) has already been visited.
a(6) cannot equal 2 as the previous occurrence of 2 happened at even index.
a(6) = 3 is suitable.
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-1 of 1 results.