OFFSET
1,3
COMMENTS
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.
The same spiral is achieved when reading one by one the digits of the sequence (instead of the terms) and using the pencil accordingly.
This is possible as the terms of the sequence were carefully chosen to match the required parities term/digit of the two spirals.
EXAMPLE
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.
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.
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.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 04 2021
STATUS
approved