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 A341903 #12 Jun 05 2021 17:03:17 %S A341903 0,1,3,2,5,4,7,6,8,9,20,10,201,22,210,24,21,26,28,12,20001,40,42,212, %T A341903 44,2001,46,48,60,14,2000001,62,64,66,214,68,200001,80,82,84,86,16, %U A341903 200000001,88,200,202,216,204,206,2003,208,220,222,218,224,226,20003,228,240,242,2010,244,246,248,203,260,262,264,266,18 %N A341903 Lexicographically earliest sequence of nonnegative terms forming a clockwise square spiral when nothing else is read except the parity of the digits or the parity of the terms (see the Comments section). %C A341903 An even term turns the pencil 0 degree to the right, then advances 1 unit; an odd term turns the pencil 90 degrees to the right, then advances 1 unit. %C A341903 The same spiral is achieved when reading one by one the digits of the sequence (instead of the terms) and using the pencil accordingly. %C A341903 This is possible as the terms of the sequence were carefully chosen to match the required parities term/digit of the two spirals. %e A341903 The pencil points towards the East before the start. The 0 doesn't change its orientation and a 1-unit line directed towards the East is traced. As 1 is odd, the pencil turns 90 degrees towards the South and a 1-unit line is traced. As 3 is odd, the pencil turns 90 degrees towards the West and a 1-unit line is traced. As 2 is even, the pencil doesn't change its orientation (towards the West) and a 1-unit line is traced. As 5 is odd, the pencil turns 90 degrees towards the North and a 1-unit line is traced. As 4 is even, the pencil doesn't change its orientation (towards the North) and a 1-unit line is traced. Etc. %e A341903 When it comes to a(11) = 20, the "digit-only-pencil" reads 2 (even), doesn't change its orientation and advances 1 square, then reads 0 (even), doesn't change its orientation and advances 1 square again. %e A341903 Similarly, when it comes to a(11) = 20, the "term-only-pencil" reads 20 (even), doesn't change its orientation and advances 1 square. The same term-only-pencil will read later a(12) = 10 (even), won't change its orientation and will advance 1 square again. Those two steps in the same direction match the two steps in the same direction of the "digit-only-pencil). Etc. %Y A341903 Cf. A344547 (uses only the "term-pencil"), A344548 (uses only the "digit-pencil"), A174344 (an example of a clockwise square spiral). %K A341903 base,nonn %O A341903 1,3 %A A341903 _Eric Angelini_ and _Carole Dubois_, Jun 04 2021