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.
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
Keywords
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
Links
- Hugo Pfoertner, Illustration of A010751(n+1) vs A305259(n).
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
Comments