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.

A334888 a(n) = Sum_{k >= 0} f(d_k) * 3^k where Sum_{k >= 0} d_k * 8^k is the base 8 representation of n and f(k) = 0, 1, 2, 2, 2, 1, 0, 0 for k = 0..7, respectively.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 14 2020

Keywords

Comments

The lattice points with coordinates (a(n), A334889(n)) for n >= 0 form a Sierpinski carpet.

Examples

			For n = 42:
- 42 = 5*8^1 + 2*8^0,
- so a(42) = f(5)*3^1 + f(2)*3^0 = 1*3^1 + 2*3^0 = 5.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (f=[0, 1, 2, 2, 2, 1, 0, 0], d=Vecrev(digits(n, #f))); sum(k=0, #d-1, f[1+d[1+k]] * 3^k) }

Formula

A153490(1 + a(n), 1 + A334889(n)) = 1.
Showing 1-1 of 1 results.