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.

A356248 Image of 1 under repeated application of the map k -> (2k-1,2k,2k-1).

Original entry on oeis.org

1, 2, 1, 3, 4, 3, 1, 2, 1, 5, 6, 5, 7, 8, 7, 5, 6, 5, 1, 2, 1, 3, 4, 3, 1, 2, 1, 9, 10, 9, 11, 12, 11, 9, 10, 9, 13, 14, 13, 15, 16, 15, 13, 14, 13, 9, 10, 9, 11, 12, 11, 9, 10, 9, 1, 2, 1, 3, 4, 3, 1, 2, 1, 5, 6, 5, 7, 8, 7, 5, 6, 5, 1, 2, 1, 3, 4, 3, 1, 2, 1
Offset: 0

Views

Author

Arie Bos, Jul 31 2022

Keywords

Examples

			1 --> 1 2 1 --> 1 2 1 3 4 3 1 2 1 --> 1 2 1 3 4 3 1 2 1 5 6 5 7 8 7 5 6 5 1 2 1 3 4 3 1 2 1 -->...
		

Crossrefs

Cf. A289813.

Programs

  • PARI
    a(n) = fromdigits(digits(n,3)%2,2) + 1; \\ Kevin Ryde, Jul 31 2022
  • Python
    def aupton(terms):
        a, n = [1], 0
        while len(a) < 3*terms: a, n = a + [(1<Michael S. Branicky, Jul 31 2022
    

Formula

If A(n) = (a(0),a(1),...,a(3^n-1)), then A(n+1) = (A(n),2^n+A(n),A(n)).
a(n) = A289813(n) + 1. - Rémy Sigrist, Jul 31 2022