The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A334812 a(0) = 0; a(1) = 1; for n > 1, a(n) is the square spiral number obtained from the magnitude of the difference between adjacent horizontal and vertical previously visited square numbers. If only one such adjacent square exists then it takes on that square's number. 1
 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0 COMMENTS As all squares are numbered from the difference between square spiral numbers which are either 0 or 1, all terms in the sequence are 0 or 1. Inspired by Pascal's Spiral A334742. LINKS Scott R. Shannon, Image of the spiral for a 101x101 grid. Black squares = 0 and white squares = 1, The central square a(0) = 0 is shown in red for clarity. Scott R. Shannon, Image of the spiral for a 2001x2001 grid. EXAMPLE The spiral begins: .   --0---1---0---0---1---1                         |     1---1---0---1---0   1     |               |   |     0   1---1---1   0   1     |   |       |   |   |     1   1   0---1   1   1     |   |           |   |     0   1---1---0---0   0     |                   |     0---1---0---0---0---0 . a(0) = 0; a(1) = 1 by definition. a(2) = 1 as it only has one adjacent visited square a(1) = 1 so it takes that number. a(3) = 1 as it has adjacent visited squares a(2) = 1 and a(0) = 0 and the difference between 1 and 0 is 1. a(7) = 1 as it has adjacent visited squares a(6) = 1 and a(0) = 0 and the difference between 1 and 0 is 1. a(8) = 0 as it has adjacent visited squares a(7) = 1 and a(1) = 1 and the difference between 1 and 1 is 0. a(9) = 0 as it only has one adjacent visited square a(8) = 0 so it takes that number. CROSSREFS Cf. A334742, A174344, A274923, A274640, A328794. Sequence in context: A175629 A109720 A022932 * A079421 A304438 A168181 Adjacent sequences:  A334809 A334810 A334811 * A334813 A334814 A334815 KEYWORD nonn AUTHOR Scott R. Shannon, May 12 2020 STATUS approved

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

Last modified April 16 18:53 EDT 2021. Contains 343050 sequences. (Running on oeis4.)