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 A337108 #14 Mar 19 2025 18:17:35 %S A337108 0,0,1,1,1,0,2,1,2,2,0,2,3,3,2,3,3,2,0,2,4,3,1,3,4,4,3,0,4,4,5,5,5,1, %T A337108 4,5,5,4,5,0,3,4,6,5,5,1,6,5,6,6,5,6,0,6,3,6,7,7,4,7,1,7,6,7,7,6,3,6, %U A337108 0,6,7,6,8,7,8,7,1,7,4,7,8,8,7,4,2,0,2 %N A337108 Square spiral constructed by greedy algorithm, so that each diagonal and antidiagonal contains distinct numbers. %C A337108 This sequence is a variant of A308896; here we walk a bishop, there a rook. %C A337108 Visually, we have a superposition of two images that we can separate by considering the parity of the x and y coordinates (see illustrations in Links section). %H A337108 Rémy Sigrist, <a href="/A337108/b337108.txt">Table of n, a(n) for n = 0..10200</a> %H A337108 Rémy Sigrist, <a href="/A337108/a337108.png">Colored representation of the spiral for -512 <= x, y <= 512</a> %H A337108 Rémy Sigrist, <a href="/A337108/a337108_1.png">Colored representation of the spiral for -512 <= x, y <= 512 and x any y have the same parity</a> %H A337108 Rémy Sigrist, <a href="/A337108/a337108_2.png">Colored representation of the spiral for -512 <= x, y <= 512 and x and y have different parity</a> %H A337108 Rémy Sigrist, <a href="/A337108/a337108.gp.txt">PARI program for A337108</a> %F A337108 a(n) = 0 iff n belongs to A035608. %e A337108 The spiral begins: %e A337108 7----7----6----7----1----7----4----7----7 %e A337108 | | %e A337108 6 5----5----4----1----5----5----5 6 %e A337108 | | | | %e A337108 3 4 3----3----2----3----3 4 3 %e A337108 | | | | | | %e A337108 6 5 2 1----1----1 2 4 6 %e A337108 | | | | | | | | %e A337108 0 0 0 0 0----0 0 0 0 %e A337108 | | | | | | | %e A337108 6 3 2 2----1----2----2 3 6 %e A337108 | | | | | %e A337108 7 4 4----3----1----3----4----4 5 %e A337108 | | | %e A337108 6 6----5----5----1----6----5----6----6 %e A337108 | %e A337108 8----7----8----7----1----7----4----7----8 %o A337108 (PARI) \\ See Links section. %Y A337108 See A274641 and A308896 for similar sequences. %Y A337108 Cf. A035608. %K A337108 nonn %O A337108 0,7 %A A337108 _Rémy Sigrist_, Aug 16 2020