login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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 symmetrized variant of the distance-limited strip bijection described in A368121.
2

%I #16 Jan 07 2024 14:07:54

%S 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,

%T 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,1,0,0,

%U -1,-2,-3,-4,-4,-5,-6,-5,-4,-4,-3,-2,-1,-1,0,0,1,2,3,4,4,5,6,6,5,5,5,4

%N 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 symmetrized variant of the distance-limited strip bijection described in A368121.

%H Hugo Pfoertner, <a href="/A368122/b368122.txt">Table of n, a(n) for n = 0..3000</a>

%H Hugo Pfoertner, <a href="https://oeis.org/plot2a?name1=A368122&amp;name2=A368123&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawlines=true">Plot of mapped spiral</a>, using Plot 2.

%H <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>

%o (PARI) \\ ax(n), ay(n) after Kevin Ryde's functions in A174344 and A274923.

%o \\ It is assumed that the PARI programs from A367150 and A368121 have been loaded and the functions defined there are available.

%o 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))};

%o 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))};

%o a368122(n) = BijectionD([ax(n), ay(n)],BijectionK)[1];

%Y A368123 gives the corresponding y-coordinates.

%Y Cf. A367150, A368121, A368127, A368128.

%Y Analogous pair of sequences, but without symmetrization: A367895, A367896.

%K sign

%O 0,10

%A _Hugo Pfoertner_, Jan 06 2024