login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367895 a(n) is the x-coordinate of the n-th point in a square spiral mapped to a square grid rotated by Pi/4 using the variant of the distance-limited strip bijection described in A367150. 5
0, 1, 0, -1, -1, -1, 0, 1, 1, 2, 2, 1, 0, 0, -1, -2, -3, -2, -2, -1, 0, 0, 1, 2, 3, 3, 3, 2, 2, 1, 0, -1, -2, -2, -3, -3, -4, -3, -3, -2, -2, -1, 0, 1, 2, 2, 3, 3, 4, 5, 4, 4, 3, 2, 1, 0, 0, -1, -1, -2, -3, -4, -4, -5, -6, -5, -4, -4, -3, -2, -1, 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,10
LINKS
Hugo Pfoertner, Plot of mapped spiral, using Plot 2.
Hugo Pfoertner, Visualization of spiral, (orange) and bijection partners from the 2 grids.
Hugo Pfoertner, Comparison of the spirals. This sequence: black, A362955: red.
PROG
(PARI) \\ ax(n), ay(n) after Kevin Ryde's functions in A174344 and A274923.
\\ It is assumed that the PARI program from A367150 has been loaded and the functions defined there are available.
ax(n) = {my (m=sqrtint(n), k=ceil(m/2)); n -= 4*k^2; if (n<0, if (n<-m, k, -k-n), if (n<m, -k, n-3*k))};
ay(n) = {my (m=sqrtint(n), k=ceil(m/2)); n -= 4*k^2; if (n<0, if (n<-m, 3*k+n, k), if (n<m, k-n, -k))};
a367895(n) = BijectionD([ax(n), ay(n)])[1]
CROSSREFS
A367896 gives the corresponding y-coordinates.
Sequence in context: A323258 A219489 A051168 * A368127 A368122 A281459
KEYWORD
sign
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 20:03 EDT 2024. Contains 372020 sequences. (Running on oeis4.)