OFFSET
0,10
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 0..3000
Hugo Pfoertner, Plot of mapped spiral, using Plot 2.
PROG
\\ It is assumed that the PARI programs from A367150 and A368121 have 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))};
a368122(n) = BijectionD([ax(n), ay(n)], BijectionK)[1];
CROSSREFS
A368123 gives the corresponding y-coordinates.
KEYWORD
sign
AUTHOR
Hugo Pfoertner, Jan 06 2024
STATUS
approved