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

A297346 List of successive x-coordinates in the Babylonian Spiral.

Original entry on oeis.org

0, 0, 1, 3, 5, 7, 7, 6, 4, 0, -4, -7, -9, -9, -8, -6, -2, 3, 9, 15, 21, 26, 29, 29, 28, 24, 17, 10, 4, 4, 5, 7, 13, 21, 28, 32, 32, 31, 29, 24, 15, 6, -1, -7, -8, -6, -1, 9, 17, 21, 15, 4, -7, -18, -26, -33, -39, -43, -43, -42, -37, -25, -15, -12, -18, -30, -39, -47, -52, -53, -51, -48, -42, -33, -22, -10, 3, 17, 31, 45, 56, 62, 54, 40, 27
Offset: 1

Views

Author

Alex Meiburg, Dec 28 2017

Keywords

Comments

The "Babylonian Spiral" is defined and illustrated in A256111. See also the MathPickle link.

Examples

			The first few points are (0,0), (0,1), (1,2), (3,2) -- thus the sequence starts out 0, 0, 1, 3.
		

Crossrefs

The y-coordinates are given in A297347. Norms of vectors are given in A256111.

Programs

  • Mathematica
    NextVec[{x_, y_}] :=
    Block[{n = x^2 + y^2 + 1}, While[SquaresR[2, n] == 0, n++];
      TakeSmallestBy[
         Union[Flatten[(Transpose[
            Transpose[Tuples[{1, -1},2]] #] & /@
            ({{#[[1]], #[[2]]}, {#[[2]], #[[1]]}})) & /@
         PowersRepresentations[n, 2, 2], 2]],
      Mod[ArcTan[#[[2]], #[[1]]] - ArcTan[y, x], 2 Pi] &, 1][[1]]
    ]
    Accumulate[NestList[NextVec, {0, 1}, 500]][[;; , 1]]

Extensions

~

A297347 List of y-coordinates in the Babylonian Spiral.

Original entry on oeis.org

0, 1, 2, 2, 1, -1, -4, -7, -10, -10, -9, -6, -2, 3, 8, 13, 17, 20, 20, 19, 17, 13, 7, 0, -7, -13, -15, -12, -7, 1, 9, 17, 23, 26, 21, 13, 4, -5, -14, -22, -25, -21, -14, -6, 4, 14, 23, 26, 19, 9, 0, 0, 1, 3, 11, 20, 30, 41, 53, 65, 76, 78, 71, 59, 48, 44, 53, 63, 75, 88, 101
Offset: 1

Views

Author

Alex Meiburg, Dec 28 2017

Keywords

Comments

The "Babylonian Spiral" is defined and illustrated in A256111.

Examples

			The first few points are (0,0), (0,1), (1,2), (3,2) -- thus the sequence starts out 0, 1, 2, 2.
		

Crossrefs

The x-coordinates are given in A297346. Norms of vectors are given in A256111.

Programs

  • Mathematica
    NextVec[{x_, y_}] :=
    Block[{n = x^2 + y^2 + 1}, While[SquaresR[2, n] == 0, n++];
      TakeSmallestBy[
         Union[Flatten[(Transpose[
            Transpose[Tuples[{1, -1}, 2]] #] & /@
            ({{#[[1]], #[[2]]}, {#[[2]], #[[1]]}})) & /@
         PowersRepresentations[n, 2, 2], 2]],
      Mod[ArcTan[#[[2]], #[[1]]] - ArcTan[y, x], 2 Pi] &, 1][[1]]
    ]
    Accumulate[NestList[NextVec, {0, 1}, 500]][[;; , 2]]

A337293 a(n) is the squared distance to the origin of the n-th vertex on an acute angled Babylonian spiral.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 5, 1, 8, 8, 5, 17, 1, 26, 0, 29, 5, 25, 25, 18, 34, 5, 50, 1, 49, 17, 18, 52, 5, 85, 2, 90, 18, 61, 125, 13, 148, 10, 153, 20, 98, 125, 41, 145, 4, 148, 18, 85, 170, 18, 225, 148, 202, 173, 61, 197, 41, 226, 10, 229, 25, 117, 170, 5, 208, 80
Offset: 0

Views

Author

John Bailey, Aug 21 2020

Keywords

Comments

An acute angled Babylonian spiral is constructed by starting with a zero vector and progressively concatenating the next longest vector with integral endpoints on a Cartesian grid. (The squares of the lengths of these vectors are A001481.) The direction of the new vector is chosen to maximize the change in direction from the previous vector. The Babylonian spiral (A256111) minimizes this angle.

Examples

			The coordinates of the first few points are (0,0), (0,1), (1,0), (-1,0), (1,1), (-1,-1), (-1,2).
		

Crossrefs

x-coordinates given in A337311. y-coordinates given in A337312.

Programs

  • Python
    # See Bailey link.

Formula

a(n) = A337311(n)^2 + A337312(n)^2.

A337311 List of successive x-coordinates in the acute angled Babylonian spiral.

Original entry on oeis.org

0, 0, 1, -1, 1, -1, -1, 0, -2, 2, -2, 1, -1, -1, 0, -2, 2, -3, 3, -3, 3, -2, 1, 1, 0, 4, -3, 4, -2, -2, -1, -3, 3, -5, 2, -2, -2, -1, -3, 2, -7, 2, -5, 1, 0, -2, 3, -7, 1, -3, -9, 2, -9, 2, -6, 1, -5, -1, -1, -2, 3, -9, 1, -2, -8, 4, -5, 3, -2, -1, 1, -2, 4
Offset: 1

Views

Author

John Bailey, Aug 22 2020

Keywords

Crossrefs

A337312 List of successive y-coordinates in the acute angled Babylonian spiral.

Original entry on oeis.org

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

Views

Author

John Bailey, Aug 22 2020

Keywords

Crossrefs

Showing 1-5 of 5 results.