cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A367895 #19 Dec 04 2023 13:20:10
%S A367895 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 A367895 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,
%U A367895 -1,-2,-3,-4,-4,-5,-6,-5,-4,-4,-3,-2,-1,0,0,1,1,2,3,4,4,5,6,6
%N 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.
%H A367895 Rainer Rosenthal, <a href="/A367895/b367895.txt">Table of n, a(n) for n = 0..3000</a>
%H A367895 Hugo Pfoertner, <a href="https://oeis.org/plot2a?name1=A367895&amp;name2=A367896&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawlines=true">Plot of mapped spiral</a>, using Plot 2.
%H A367895 Hugo Pfoertner, <a href="/A367895/a367895.png">Visualization of spiral</a>, (orange) and bijection partners from the 2 grids.
%H A367895 Hugo Pfoertner, <a href="/A367895/a367895_1.pdf">Comparison of the spirals</a>. This sequence: black, A362955: red.
%o A367895 (PARI) \\ ax(n), ay(n) after Kevin Ryde's functions in A174344 and A274923.
%o A367895 \\ It is assumed that the PARI program from A367150 has been loaded and the functions defined there are available.
%o A367895 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 A367895 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 A367895 a367895(n) = BijectionD([ax(n), ay(n)])[1]
%Y A367895 A367896 gives the corresponding y-coordinates.
%Y A367895 Cf. A307110, A362955, A362956, A367150.
%K A367895 sign
%O A367895 0,10
%A A367895 _Hugo Pfoertner_ and _Rainer Rosenthal_, Dec 04 2023