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

A359058 a(n) = squared distance to the origin of the n-th vertex on a counterclockwise undulating spiral in a square grid.

Original entry on oeis.org

0, 1, 2, 1, 4, 5, 2, 5, 4, 1, 2, 1, 4, 5, 2, 5, 4, 9, 10, 5, 8, 5, 10, 9, 16, 17, 10, 13, 8, 13, 10, 17, 16, 9, 10, 5, 8, 5, 10, 9, 16, 17, 10, 13, 8, 13, 10, 17, 16, 25, 26, 17, 20, 13, 18, 13, 20, 17, 26, 25, 36, 37, 26, 29, 20, 25, 18, 25, 20, 29, 26, 37, 36, 25, 26, 17, 20, 13, 18, 13, 20
Offset: 0

Views

Author

Hans G. Oberlack, Dec 14 2022

Keywords

Comments

The spiral coordinates are A359216 and A359217.

Examples

			The spiral begins as follows and for instance point n=7 is at x=-2,y=1 so that a(7) = (-2)^2 + 1^2 = 5.
   y ^
     |
   4 |             17--16
     |              |   |
   3 |         13--10   9--10
     |          |           |
   2 |     13---8   5---4   5---8
     |      |       |   |       |
   1 | 17--10   5---2   1---2   5--10
     |  |       |           |       |
   0 | 16---9   4---1   0---1   4---9
     |      |       |           |       |
  -1 |     10---5   2---1   2---5  10--17
     |          |       |   |       |
  -2 |          8---5   4---5   8--13
     |              |           |
  -3 |             10---9  10--13
     |                  |   |
  -4 |                 16--17
     +------------------------------------>
       -4  -3  -2  -1   0   1   2   3   4 x
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = A359216(n)^2 + A359217(n)^2.

A359216 X-coordinates of a point moving in a counterclockwise undulating spiral in a square grid.

Original entry on oeis.org

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

Views

Author

Hans G. Oberlack, Dec 21 2022

Keywords

Comments

Y-coordinates are given in A359217.
The undulating spiral is
y ^
|
4 | 25--24
| | |
3 | 27--26 23--22
| | |
2 | 29--28 5---4 21--20
| | | | |
1 | 31--30 7---6 3---2 19--18
| | | | |
0 | 32--33 8---9 0---1 16--17
| | | | |
-1 | 34--35 10--11 14--15 46--47
| | | | |
-2 | 36--37 12--13 44--45
| | |
-3 | 38--39 42--43
| | |
-4 | 40--41
+------------------------------------>
-4 -3 -2 -1 0 1 2 3 4 x

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(2*n) = A329116(n). - Rémy Sigrist, Apr 01 2023

A367914 Movement sequence in the counter-clockwise undulating spiral, whereby 1, 2, 3, 4 represent moves to the right, down, left and up.

Original entry on oeis.org

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

Views

Author

Hans G. Oberlack, Dec 04 2023

Keywords

Comments

y ^
|
4 | 2---3
| | |
3 | 2---3 4---3
| | |
2 | 2---3 2---3 4---3
| | | | |
1 | 2---3 2---3 4---3 4---3
| | | | |
0 | 1---2 1---2 1---4 1---4
| | | | |
-1 | 1---2 1-- 2 1---4 1---4
| | | | |
-2 | 1---2 1---4 1---4
| | |
-3 | 1---2 1---4
| | |
-4 | 1---4
+------------------------------------>
-4 -3 -2 -1 0 1 2 3 4 x

Crossrefs

Formula

a(k1)=1 with k1=i^2*8+i*0+2*j+1 with i,j >= 0 and j<=4i.
a(k2)=2 with k2=i^2*8+i*12+2*j+6 with i,j >= 0 and j<=4*i+3.
a(k3)=3 with k3=i^2*8+i*8+2*j+3 with i,j >= 0 and j<=4*i+2.
a(k4)=4 with k4=i^2*8+i*4+2*j+2 with i,j >= 0 and j<=4*i+1.
Showing 1-3 of 3 results.