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 A368126 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))};
a368127(n) = BijectionD([ax(n), ay(n)], Bijectionk)[1];
CROSSREFS
KEYWORD
sign
AUTHOR
Hugo Pfoertner, Jan 07 2024
STATUS
approved