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

A332250 a(n) is the Y-coordinate of the n-th point of the quadratic Koch curve. Sequence A332249 gives X-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Feb 08 2020

Keywords

Comments

This sequence is the imaginary part of {f(n)} defined as:
- f(0) = 0,
- f(n+1) = f(n) + i^t(n)
where t(n) is the number of 1's minus the number of 3's
in the base 5 representation of n
and i denotes the imaginary unit.

Crossrefs

Cf. A332249 (X-coordinates and additional comments).

Programs

  • PARI
    { k = [0, 1, 0, -1, 0]; z=0; for (n=0, 80, print1 (imag(z) ", "); z += I^vecsum(apply(d -> k[1+d], digits(n, #k)))) }

Formula

a(5^k-m) = a(m) for any k >= 0 and m = 0..5^k.

A340320 a(n) is the X-coordinate of the n-th point of a variant of the quadratic Koch curve. Sequence A340321 gives Y-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 04 2021

Keywords

Comments

The curve is built by successively applying the following substitution to an initial vector (1, 0) (the two vertical copies are horizontally flipped):
*
.------>.
^ |
|* *|
* | v *
.------>. .------>.
The quadratic Koch curve is built without horizontal flip.

Examples

			The curve starts as follows:
                     +---+
                     |12 |13
                     |   |
                 +---+   +---+
                 |10  11  14 |15
                 |           |
                 +---+   +---+
                  9  |8  |17  16
                     |   |
         +---+   +---+   +---+   +---+
         |2  |3  |6   7   18 |19 |22 |23
         |   |   |           |   |   |
     +---+   +---+           +---+   +---+
      0   1   4   5           20  21  24  25
- so a(0) = 0,
     a(5) = a(6) = a(9) = a(10) = 3.
		

Crossrefs

See A332249 and A340327 for similar sequences.
Cf. A340321 (Y-coordinates).

Programs

  • PARI
    See Links section.

A340327 a(n) is the X-coordinate of the n-th point of a variant of the quadratic Koch curve. Sequence A340328 gives Y-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 04 2021

Keywords

Comments

The curve is built by successively applying the following substitution to an initial vector (1, 0) (we have 4 copies and a horizontal unit vector):
.-.
^ |
| |
| v
.------>. .------>.
The curve visits once or twice every lattice point (x, y) such that 0 <= y <= x.
The quadratic Koch curve is built from 5 copies at each step.

Examples

			The curve starts as follows:
                                    +
                                    |42
                                    |
                               +----+
                               |40   41
                               |
                          +----+----+
                          |34  |35  |38
                          |    |39  |
                     +----+    +----+
                     |32   33   36   37
                     |
                +----+----+    +----+
                |10  |11  |30  |27  |26
                |    |31  |    |    |
           +----+    +----+----+----+
           |8    9    12  |13  |24   25
           |              |29  |28
      +----+----+    +----+----+----+
      |2   |3   |6   |15  |14  |19  |22
      |    |7   |    |    |18  |23  |
+----+    +----+    +----+    +----+
  0    1    4    5    16   17   20   21
- so a(0) = 0,
     a(5) = a(6) = a(9) = a(10) = 3.
		

Crossrefs

See A332249 and A340320 for similar sequences.
Cf. A340328 (Y-coordinates).

Programs

  • PARI
    See Links section.

A229217 If 1 and 2 represent the 2D vectors (1,0) and (0,1) and -1 and -2 are the negation of these vectors, then this sequence represents the Koch curve.

Original entry on oeis.org

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

Views

Author

Arie Bos, Sep 25 2013

Keywords

Comments

The sequence is generated by the rewriting rules:
P(1) = 1,2,1,-2,1;
P(2) = 2,-1,2,1,2 and
P(-1) = -1,-2,-1,2,-1;
P(-2) = -2,1,-2,-1,-2, so P(-x)=-P(x).
The start is 1.

Examples

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

Crossrefs

Coordinates: A332249, A332250.
Showing 1-4 of 4 results.