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

A332298 a(n) is the X-coordinate of the n-th point of the Fibonacci word fractal. Sequence A332299 gives Y-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Feb 09 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 A003849(k) = 1 then:
- if k is even then turn 90 degrees to the right
- otherwise turn 90 degrees to the left.

Crossrefs

Cf. A003849, A265318, A332299 (Y-coordinates).

Programs

  • PARI
    A003849(n)=my(k=2); while(fibonacci(k)<=n, k++); while(n>1, while(fibonacci(k--)>n, ); n-=fibonacci(k)); n==1
    { z=0; d=I; for (n=0, 76, print1 (real(z) ", "); if (A003849(n)==0, if (n%2==0, d/=I, d*=I);); z+=d) }

A265318 Fibonacci word fractal in an n X n grid, starting downwards from the top-left corner, listed antidiagonally.

Original entry on oeis.org

1, 0, 2, 5, 3, 0, 6, 4, 0, 0, 7, 0, 0, 0, 0, 0, 8, 10, 0, 0, 20, 0, 0, 9, 11, 0, 19, 21, 0, 0, 0, 0, 12, 18, 0, 22, 0, 0, 0, 0, 13, 0, 17, 23, 0, 0, 0, 0, 0, 0, 14, 16, 0, 24, 26, 0, 0, 0, 0, 0, 0, 15, 0, 0, 25, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 83
Offset: 1

Views

Author

Max Barrentine, Dec 06 2015

Keywords

Comments

The n-th iteration of this curve ends at the n-th Fibonacci number.
As this is not a space-filling curve, not all points on the grid are reached by the curve; these points are given the value 0.

Examples

			The top left corner of the array shows how this curve begins (connect the terms in numerical order):
   1   0   5   6   7
   2   3   4   0   8
   0   0   0  10   9
   0   0   0  11   0
   0   0   0  12  13
  20  19  18   0  14
  21   0  17  16  15
  22  23   0   0   0
   0  24   0   0   0
  26  25   0   0   0
  27   0  31  32  33
  28  29  30   0  34
		

Crossrefs

See also A163357, A163334, and A054238 for other fractal curves.
Showing 1-2 of 2 results.