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.

A332383 a(n) is the X-coordinate of the n-th point of the dragon curve. Sequence A332384 gives Y-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Feb 10 2020

Keywords

Comments

To build the curve:
- start from the origin looking to the right,
- for k = 0, 1, ...:
- move forward to the next lattice point,
- if A014577(n) = 1 then turn 90 degrees to the left
otherwise turn 90 degrees to the right.

Crossrefs

See A332251 for a similar sequence.
Cf. A014577, A332384 (Y-coordinates).

Programs

  • Mathematica
    Re[Join[{0}, Accumulate[Nest[Join[#, Reverse[I #]] &, {1}, 7]]]] (* Vladimir Reshetnikov, Apr 14 2022 *)
  • PARI
    A014577(n)=1/2*(1+(-1)^(1/2*((n+1)/2^valuation(n+1, 2)-1)))
    { z=0; d=1; for (n=0, 71, print1 (real(z) ", "); z += d; d*=if (A014577(n), +I, -I)) }

Formula

For any k >= 0:
- a(2^(4*k)) = (-4)^k,
- a(2^(4*k+1)) = (-4)^k,
- a(2^(4*k+2)) = 0,
- a(2^(4*k+3)) = -2*(-4)^k.

A355459 Real part of the Heighway/harter dragon curve points which are on the real axis.

Original entry on oeis.org

0, 1, -2, -3, -4, -5, 6, 7, 8, 7, 10, 11, 12, 13, 18, 17, 16, 15, 18, 19, 20, 21, -22, -23, -24, -23, -26, -27, -28, -29, -34, -33, -32, -33, -30, -29, -28, -27, -38, -39, -40, -39, -42, -43, -44, -45, -50, -49, -48, -47
Offset: 0

Views

Author

Reed Michael Upson, Jul 02 2022

Keywords

Comments

This sequence gives the values A332383(k) when A332384(k) = 0. - Rémy Sigrist, Oct 04 2022

Crossrefs

Programs

  • PARI
    See Links section.

A355460 Imaginary part of the Heighway/Harter dragon curve points which are on the imaginary axis.

Original entry on oeis.org

0, 1, 2, -3, -4, -5, -6, -9, -8, -9, -10, 11, 12, 13, 14, 17, 16, 15, 14, 19, 20, 21, 22, 25, 24, 25, 26, 37, 36, 35, 34, 31, 32, 31, 30, 35, 36, 37, 38, 41, 40, 41, 42, -43, -44, -45, -46, -49, -48, -47
Offset: 0

Views

Author

Reed Michael Upson, Jul 02 2022

Keywords

Comments

This sequence gives the values A332384(k) when A332383(k) = 0. - Rémy Sigrist, Oct 04 2022

Crossrefs

Programs

  • PARI
    See Links section.

A343949 Shortest distance from curve start to end along the segments of dragon curve expansion level n, and which is the diameter of the curve as a graph.

Original entry on oeis.org

1, 2, 4, 8, 12, 18, 26, 36, 52, 70, 102, 136, 200, 266, 394, 524, 780, 1038, 1550, 2064, 3088, 4114, 6162, 8212, 12308, 16406, 24598, 32792, 49176, 65562, 98330, 131100, 196636, 262174, 393246, 524320, 786464, 1048610, 1572898, 2097188, 3145764, 4194342, 6291494
Offset: 0

Views

Author

Kevin Ryde, May 05 2021

Keywords

Comments

Expansion level n is the first 2^n segments of the curve, and can be taken as a graph with visited points as vertices and segments as edges.

Examples

			Curve n=4:
     *--*  *--*
     |  |  |  |        Start S to end E along segments.
     *--*--*  *--*     Distance a(4) = 12,
        |        |     which is also graph diameter.
  E  *--*     S--*
  |  |
  *--*
		

Crossrefs

Cf. A332383, A332384 (curve coordinates).

Programs

  • PARI
    a(n) = if(n==0,1, my(t=n%2); (3+t)<<(n>>1) + n-4 + t);

Formula

a(0) = 1.
a(2*n) = 3*2^n + 2*n - 4 = 2*A275970(n-1), for n>=1.
a(2*n+1) = 4*2^n + 2*n - 2 = 2*A083706(n).
a(n+1) - a(n) = 2*A228693(n), for n>=1.
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 2*a(n-4) + 2*a(n-5) for n >= 6.
G.f.: (1 + x - x^2 + x^3 - 4*x^5) / ((1+x) * (1-x)^2 * (1-2*x^2)).
G.f.: 2 - (1/2)/(1+x) - (9/2)/(1-x) + 1/(1-x)^2 + (3 + 4*x)/(1 - 2*x^2).
Showing 1-4 of 4 results.