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-6 of 6 results.

A261180 Flowsnake phases, exp(I 2 Pi a(n) / 6) are vectors in a sequence that visits points of the hexagonal root lattice A_2.

Original entry on oeis.org

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

Views

Author

Bradley Klee, Aug 10 2015

Keywords

Comments

This sequence is generated by a Lindenmayer system over six symbols, { M[n], P[n] } with n in {0,1,2}. The replacement rules are:
P[n] |---> P[n], M[n - 1], M[n], P[n + 1], P[n], P[n], M[n + 1];
M[n] |---> P[n + 1], M[n], M[n], M[n + 1], P[n], P[n - 1], M[n];
with all arithmetic evaluated modulo 3.
The numeric sequence changes the signed vectors M[n] and P[n] into exponent coefficients according to another set of replacement rules:
P[n] |---> Mod[2 n, 6];
M[n] |---> Mod[2 n + 3, 6].
The axiom for sequence is P[0]=0; however, other axioms are just as good.
a(n) is one of three right infinite sequences. The other right infinite sequences are a(3*7+n) and a(11*7+n). If n is a negative number, the left infinite sequences are (a(-n)+3) mod 6, (a(-3*7-n)+3) mod 6, and (a(-11*7-n)+3) mod 6. The valid two-way infinite sequences are generated from M[n]|P[m], n != m, or: { 1|0, 5|0, 1|2, 3|2, 3|4, 5|4 }.
From Michel Dekking, Oct 14 2022: (Start)
This sequence is a 7-automatic sequence on the alphabet A = {0,1,2,3,4,5}, fixed point with starting letter 0 of a morphism alpha.
Let sigma be the rotation on A given by sigma(a) = a+1 mod 6, and let rho be the reversal map given by rho(w_1...w_m) = w_m...w_1 for all words w_1...w_m in A^*.
The morphism alpha is defined by alpha(0) = 0132005, and by requiring that alpha commutes with the map sigma rho. So, for example, alpha(1) = 0113421.
See A229214 for another form of (a(n)). The standard form of (a(n)) is given by the sequence x = 1,2,3,4,1,1,5,1,2,2,3,6,4,2,...(First map A to {1,...,6} by a->a+1, and then apply the permutation (34)(56)). (End)

Crossrefs

Cf. A229214 (as +-1,2,3), A261185 (mod 2), A261120.
Coordinates: A334485, A334486.

Programs

  • Mathematica
    FLSN = {P[n_] :> {P[n], M[n - 1], M[n], P[n + 1], P[n], P[n], M[n + 1]},
    M[n_] :> {P[n + 1], M[n], M[n], M[n + 1], P[n], P[n - 1], M[n]}};
    a[1]=P[0];Map[(a[n_/;IntegerQ[(n - #)/7]]:=Part[Flatten[a[(n + 7 - #)/7] /. FLSN], #]) &, Range[7]];
    Mod[a /@ Range[7*7]/.{P[x_]:>Mod[2 x, 6],M[x_]:>Mod[2 x + 3, 6]}, 6]
  • PARI
    \\ See links.

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.

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

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 2, 3, 4, 5, 5, 5, 4, 4, 3, 3, 4, 4, 3, 2, 3, 4, 5, 5, 6, 6, 7, 7, 7, 6, 6, 7, 7, 8, 8, 8, 7, 6, 5, 4, 5, 6, 6, 5, 5, 6, 6, 7, 7, 7, 6, 6, 7, 8, 8, 7, 8, 9, 9, 10, 11, 11, 10, 11, 12, 13, 13, 13, 12, 12, 11, 11, 10, 9, 10, 10
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

Examples

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

Crossrefs

Cf. A334485 (X coordinate), A229214 (direction +-1,2,3), A261180 (direction 0..5).

Programs

  • PARI
    See Links section.

A229215 If 1, 2, and 3 represent the three 2D vectors (1,0), (0.5,sqrt(3)/2) and (-0.5,sqrt(3)/2) and -1, -2 and -3 are the negation of these vectors, then this sequence represents Gosper's island.

Original entry on oeis.org

1, -3, 1, -3, -2, -3, 1, -3, 1, -3, -2, -3, -2, -1, -2, -3, -2, -3, 1, -3, 1, -3, -2, -3, 1, -3, 1, -3, -2, -3, -2, -1, -2, -3, -2, -3, -2, -1, -2, -1, 3, -1, -2, -1, -2, -3, -2, -3, -2, -1, -2, -3, -2, -3, 1, -3, 1, -3, -2, -3, 1, -3, 1, -3, -2, -3, -2
Offset: 1

Views

Author

Arie Bos, Sep 24 2013

Keywords

Comments

The sequence is generated by the rewriting rules
P(1) = 1,-3,1,
P(2) = 2,1,2,
P(3) = 3,2,3,
P(-3) = -3,-2,-3,
P(-2) = -2,-1,-2,
P(-1) = -1,3,-1.
The start is 1,2,3,-1,-2,-3.
Notice P(-x)= -P(x), since P(x) is symmetric.
Among the starting values, only the initial "1" is relevant for computation of the sequence, the image of the other elements (2,3,-1,-2,-3) becomes "pushed away" to infinity. - M. F. Hasler, Aug 06 2015

Examples

			Start with 1,2,3,-1,-2,-3 and you get
in the first step 1,-3,1,2,1,2,3,2,3,-1,3,-1,-2,-1,-2,-3,-2,-3 and
in the second step 1,-3,1,-3,-2,-3,1,-3,1,2,1,2,1,-3, ... ,-1,-2,-3,-2,-3.
With each step the length increases by a factor of 3.
		

Crossrefs

Cf. A229214.

Programs

  • Mathematica
    SubstitutionSystem[{t_ :> {{1,-3,1}, {2,1,2}, {3,2,3}}[[Abs[t]]]*Sign[t]}, {1}, {3}][[1]] (* Paolo Xausa, Jun 12 2024 *)
  • PARI
    (P(v)=concat(apply(i->[i,i-sign(i)*4^(i*i<2),i],v)));A229215=P(P(P(P([1])))) \\ To get a(n), ceil(log_3(n)) iterations are required. - M. F. Hasler, Aug 06 2015

Extensions

Definition corrected by Kerry Mitchell, Aug 06 2015

A265671 Directions of edges in a plane-filling curve of order 13.

Original entry on oeis.org

1, 2, 2, 2, 1, 3, 1, 1, 2, 3, 2, 2, 1, 2, 3, 3, 3, 2, 1, 2, 2, 3, 1, 3, 3, 2, 2, 3, 3, 3, 2, 1, 2, 2, 3, 1, 3, 3, 2, 2, 3, 3, 3, 2, 1, 2, 2, 3, 1, 3, 3, 2, 1, 2, 2, 2, 1, 3, 1, 1, 2, 3, 2, 2, 1, 3, 1, 1, 1, 3, 2, 3, 3, 1, 2, 1, 1, 3, 1, 2, 2, 2, 1, 3, 1, 1, 2, 3, 2, 2, 1, 1, 2, 2, 2, 1, 3, 1, 1, 2, 3, 2, 2, 1, 2, 3, 3
Offset: 1

Views

Author

Joerg Arndt, Dec 13 2015

Keywords

Comments

Infinite ternary word generated from the axiom 1 by the Lindenmayer system with maps 1 --> 1222131123221, 2 --> 2333212231332, and 3 --> 3111323312113.
This is a 13-automatic sequence. It can be generated by reading the lowest nonzero digit D in the base-13 expansion of n>=1: a(n)=1 for D \in {1, 5, 7, 8}, a(n)=2 for D \in {2, 3, 4, 9, 11, 12}, and a(n)=3 for D \in {6, 10}.
Corresponds to a grid-filling curve on the triangular grid as a sequence of directed edges where the letters are the directions of the third roots of unity. See the file titled "First iterate of the curve".
The corresponding sequence of turns (by 0 or +-120 degree) can be obtained from the L-system with axiom + and maps + --> +00--+0++-0-+, 0 --> +00--+0++-0-0, and - --> +00--+0++-0--.
The shape of the curve is one of the A234434(13)=15 possible shapes.
An L-system with axiom F and just one non-constant map F --> F+F0F0F-F-F+F0F+F+F-F0F-F generates the curve when 0, +, and - are interpreted as turns and F as a unit stroke in the current direction.
Three copies of the curve can be arranged to create a rep-tile that is a lattice tiling, see the files "Tile-plus" (axiom F+F+F), "Tile-minus" (Axiom F-F-F), "Tiling-plus" (self-similarity of the Tile-plus), and "Complex numeration system" (giving the generalized unit square of a numeration system with base 1 + i * sqrt(12) that reproduces the Tile-plus).

Crossrefs

Cf. A234434 (curves on the triangular grid).
Cf. A229214 (a similar L-system for Gosper's flowsnake).

Programs

  • Mathematica
    SubstitutionSystem[{1 -> {1,2,2,2,1,3,1,1,2,3,2,2,1}, 2 -> {2,3,3,3,2,1,2,2,3,1,3,3,2}, 3 -> {3,1,1,1,3,2,3,3,1,2,1,1,3}}, {1}, {2}][[1]] (* Paolo Xausa, Jun 11 2024 *)

A356112 Direction of segment n in the E curve of Dekking and McKenna.

Original entry on oeis.org

1, 1, 2, -1, 2, 1, 2, -1, -1, 2, 1, 1, 1, 2, 1, -2, -2, -1, -2, -2, 1, 2, 1, -2, -2, 1, 1, 2, -1, 2, 1, 2, -1, -1, 2, 1, 1, 1, 2, 1, -2, -2, -1, -2, -2, 1, 2, 1, -2, -2, 1, 1, 2, -1, 2, 1, 1, -2, 1, 1, 2, -1, 2, 2, 2, -1, -2, -2, -1, 2, -1, -2, -1, 2, 2, 2, 2, -1, -2, -1, 2, 2, 1, 2, 2, -1, -2, -1, -1, -1, -2, 1, 1, -2, -1, -2, 1, -2, -1, -1, 2, 2, -1, -2
Offset: 0

Views

Author

Arie Bos, Jul 27 2022

Keywords

Comments

On the square grid go one step to the left for a -1, one to the right for a +1, one down for a -2, and one up for a +2. Otherwise stated, replace +-1 with the vector +-(1,0) and +-2 with the vector +-(0,1), then take the running sum to obtain all the vertices of the fractal.
Dekking's "Recurrent sets" published this first, but this "E-curve" was discovered in 1978 by Douglas McKenna.

References

  • Douglas M. McKenna, "SquaRecurves, E-Tours, Eddies, and Frenzies: Basic Families of Peano Curves on the Square Grid", in "The Lighter Side of Mathematics: Proceedings of the Eugene Strens Memorial Conference on Recreational Mathematics and its History", Mathematical Association of America, 1994, pages 49-73, ISBN 0-88385-516-X.

Crossrefs

Other curves: A229214, A261180.

Formula

If s=[a,b] is a signed permutation, then s(1)=a, s(2)=b, s(-x)=-s(x), a,b,x in {1,2,-1,-2}. Substitution T is defined by T(i) = (i, i, ut, -t, u, i, ut, -t, -i, ut, i, i, t, u, t, -u, -u, -t, -u, -ut, t, u, i, -ut, -ut), where the signed permutations are defined by i=[1,2], t=[1, -2], u=[2, -1]. The start of the substitution is 1. This means that
T([1,2]x)=([1,2](x), [1,2](x), [2,-1][1,-2](x), -[1,-2](x), [2,-1](x), [1,2](x), [2,-1][1,-2](x), -[1,-2](x), -[1,2](x), [2,-1][1,-2](x), [1,2](x), [1,2](x), [1,-2](x), [2,-1](x), [1,-2](x), -[2,-1](x), -[2,-1](x), -[1,-2](x), -[2,-1](x), -[2,-1][1,-2](x), [1,-2](x), [2,-1](x), [1,2](x), -[2,-1][1,-2](x), -[2,-1][1,-2])(x)),
So T(1)=(1,1,2,-1,2, 1,2,-1,-1,2, 1,1,1,2,1, -2,-2,-1,-2,-2, 1,2,1,-2,-2) etc.
(See Bos arXiv link, appendix B3.)
Showing 1-6 of 6 results.