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.

A305259 x-coordinates of a point moving counterclockwise on concentric squares of grid points rotated by Pi/4 with side length m*sqrt(2), m=1,2,..., with jump to next square on the positive x-axis.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Jun 02 2018

Keywords

Comments

The corresponding y-coordinates of the point are given in A010751.

Examples

			   y ^
     |                       |
   3 |                      16     28
     |                     / | \      \
     |                   /   |   \      \
     |                 /     |     \      \
   2 |               17      7     15     27
     |              /      / | \      \      \
     |            /      /   |   \      \      \
     |          /      /     |     \      \      \
   1 |        18      8      2      6     14     26
     |       /      /      / | \      \      \      \
     |     /      /      /   |   \      \      \      \
     |   /      /      /     |     \      \      \      \
   0 +-19------9------3------+------1------5-----13-----25->
     |   \      \      \     |    --------/      /      /
     |     \      \      \   |   /     ----------      /
     |       \      \      \ | /      /      ----------
  -1 |        20     10      4     12     24
     |          \      \     |     /      /
     |            \      \   |   /      /
     |              \      \ | /      /
  -2 |               21     11     23
     |                 \     |     /
     |                   \   |   /
     |                     \ | /
  -3 |                      22
     |                       |
     +-----------------------+--------------------------->
       -3     -2     -1      0      1      2      3      x
		

Crossrefs

Cf. A001844 (jump to next square), A010751 (y-coordinates), A304587.

Programs

  • PARI
    for(m=1,6,vert=[m,0,-m,0,m];for(k=1,4,v=vert[k];w=vert[k+1];s=sign(w-v);forstep(j=v,w-s,s,print1(j,", ")))) \\ Hugo Pfoertner, Jun 02 2018