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.

A334485 a(n) is the X-coordinate of the n-th point of Gosper's flowsnake curve; sequence A334486 gives Y-coordinates.

Original entry on oeis.org

0, 1, 1, 0, -1, 0, 1, 2, 3, 3, 3, 2, 2, 1, 1, 0, -1, -2, -1, 0, 0, -1, -2, -3, -2, -2, -3, -4, -4, -3, -3, -4, -5, -4, -3, -2, -1, -1, -2, -3, -2, -1, 0, 0, 1, 2, 2, 1, 2, 3, 4, 4, 3, 2, 3, 4, 5, 6, 6, 6, 5, 5, 4, 4, 5, 5, 5, 4, 4, 3, 3, 2, 1, 0, 1, 2, 2, 1, 1
Offset: 0

Views

Author

Rémy Sigrist, May 03 2020

Keywords

Comments

Coordinates are given on a hexagonal lattice with X-axis and Y-axis as follows:
Y
/
/
0 ---- X
The Gosper curve can be represented using an L-system.

Examples

			The Gosper curve starts (on a hexagonal lattice) as follows:
     .   .   .   .   .   +---+---+   .   .   .   .
                          \       \
       .   .   +---+---+   +---+   +   .   .   .   .
                \       \     /   /
     .   .   .   +---+   +---+   +   +---+   .   .
                    /             \   \   \
       .   .   +---+   +---+---+   +   +   +   .   .
              /         \       \   \ /    49
     .   .   +   +---+   +---+   +   +   .   .   .
              \   \   \     /   /
       .   .   +   +   +---+   +   +---+   .   .   .
                \ /             \ /   /10
     .   .   .   +   +---+---+   +   +   .   .   .
                 25   \       \     /9
       .   .   .   .   +---+   +---+   .   .   .   .
                          /    7   8
     .   .   .   .   +---+   .   .   .   .   .   .
                     0   1
- hence a(8) = a(9) = a(10) = a(50) = 3.
		

Crossrefs

Cf. A334486 (Y coordinate), A229214 (directions +-1,2,3), A261180 (directions 0..5).

Programs

  • PARI
    See Links section.