The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345011 Lexicographically earliest sequence of nonnegative terms forming a clockwise square spiral when nothing else is read except the nonprime/prime nature of the terms (see the Comments section). 1
0, 2, 3, 1, 5, 4, 7, 6, 8, 11, 9, 10, 13, 12, 14, 15, 17, 16, 18, 20, 19, 21, 22, 24, 25, 23, 26, 27, 28, 30, 29, 32, 33, 34, 35, 36, 31, 38, 39, 40, 42, 44, 37, 45, 46, 48, 49, 50, 51, 41, 52, 54, 55, 56, 57, 58, 43, 60, 62, 63, 64, 65, 66, 68, 47, 69, 70, 72, 74, 75, 76, 77, 53, 78, 80, 81, 82, 84, 85, 86 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A nonprime term turns the pencil 0 degrees to the right, then advances 1 unit; a prime term turns the pencil 90 degrees to the right, then advances 1 unit.
LINKS
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 2 is prime, the pencil turns 90 degrees towards the South and a 1-unit line is traced. As 3 is prime, the pencil turns 90 degrees towards the West and a 1-unit line is traced. As 1 is nonprime, the pencil doesn't change its orientation (towards the West) and a 1-unit line is traced. As 5 is prime, the pencil turns 90 degrees towards the North and a 1-unit line is traced. As 4 is nonprime, the pencil doesn't change its orientation (towards the North) and a 1-unit line is traced. Etc.
CROSSREFS
Cf. A345012 (same idea with nonprime/prime digits), A344547 (same idea with even/odd terms), A174344 (an example of a clockwise square spiral).
Sequence in context: A347120 A319068 A335423 * A345012 A345145 A114690
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 05 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 18:29 EDT 2024. Contains 372549 sequences. (Running on oeis4.)