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.

A344547 Lexicographically earliest sequence of nonnegative terms forming a clockwise square spiral when nothing else is read except the parity of the terms (see the Comments section).

Original entry on oeis.org

0, 1, 3, 2, 5, 4, 7, 6, 8, 9, 10, 12, 11, 14, 16, 18, 13, 20, 22, 24, 15, 26, 28, 30, 32, 17, 34, 36, 38, 40, 19, 42, 44, 46, 48, 50, 21, 52, 54, 56, 58, 60, 23, 62, 64, 66, 68, 70, 72, 25, 74, 76, 78, 80, 82, 84, 27, 86, 88, 90, 92, 94, 96, 98, 29, 100, 102, 104, 106, 108, 110, 112, 31, 114
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Jun 04 2021

Keywords

Comments

An even term turns the pencil 0 degrees to the right, then advances 1 unit; an odd term turns the pencil 90 degrees to the right, then advances 1 unit.

Examples

			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.
		

Crossrefs

Cf. A344548 (same idea with digits), A174344 (an example of a clockwise square spiral).