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.
%I A340172 #16 Jan 03 2021 06:43:04 %S A340172 0,0,1,1,1,1,0,-1,-2,-2,-2,-2,-2,-2,-1,0,1,2,3,3,3,3,3,3,3,3,2,1,0,-1, %T A340172 -2,-3,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-2,-1,0,1,2,3,4,5,5,5,5,5,5,5, %U A340172 5,5,5,5,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-6,-6,-6 %N A340172 List of Y-coordinates of point moving along one of the arms of a counterclockwise double square spiral; A340171 gives X-coordinates. %C A340172 The odd function f such that f(n) = (A340171(n), a(n)) for any n >= 0 will visit exactly once every lattice point (so it is a bijection from Z to Z^2). %H A340172 Rémy Sigrist, <a href="/A340172/b340172.txt">Table of n, a(n) for n = 0..10000</a> %H A340172 Rémy Sigrist, <a href="/A340172/a340172.gp.txt">PARI program for A340172</a> %H A340172 <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a> %F A340172 abs(a(n+1)-a(n)) + abs(A340171(n+1)-A340171(n)) = 1. %F A340172 a(n) = A340171(n) iff n belongs to A001105. %F A340172 a(n) = - A340171(n) iff n belongs to A046092. %F A340172 2*a(n) = A340171(n) iff n belongs to A139274. %F A340172 a(n) = 2*A340171(n) iff n belongs to A139275. %F A340172 a(n) * A340171(n) = 0 iff n belongs to A000217. %F A340172 a(n) = 0 iff n belongs to A000384. %e A340172 The spiral starts as follows: %e A340172 +-----+-----+-----+-----+-----+ %e A340172 . | %e A340172 . | %e A340172 . +-----+-----+-----+ + %e A340172 . |5 4 3 |2 | %e A340172 . | | | %e A340172 + +-----+-----+ + %e A340172 |6 | 0 1 | . %e A340172 | | | . %e A340172 + +-----+-----+-----+ . %e A340172 |7 . %e A340172 | . %e A340172 +-----+-----+-----+-----+-----+ %e A340172 8 9 10 11 12 13 %e A340172 - so a(0) = a(1) = a(6) = 0, %e A340172 - a(2) = a(3) = a(4) = a(5) = 1. %o A340172 (PARI) See Links section. %Y A340172 Cf. A000217, A000384, A001105, A046092, A139274, A139275, A274923, A340171. %K A340172 sign %O A340172 0,9 %A A340172 _Rémy Sigrist_, Dec 30 2020