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!)
A256175 Babylonian Wurm - The change of direction in successive segments is recorded as 1 (clockwise) or -1 (counterclockwise). 7
1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

A Babylonian Wurm is constructed by starting at (0,0) with a unit vector pointing North and then a clockwise turn with the root 2 length vector pointing NE. For subsequent segments, progressively concatenate the next longer vector with integral endpoints on a Cartesian grid. (The squares of the lengths of these vectors are A001481.) The direction of the new vector is chosen to minimize the change in direction from the previous vector. If there is a tie, the direction will be chosen so the wurm continues to turn in the same direction as the previous turn. - Gordon Hamilton, Mar 17 2015

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . 2 . 3 . . . . . . . . . . . . . .

     . 1 . . . . 4 . . . . . . . . . . . .

     . o . . . . . . . . . . . . . . . . .

     . . . . . . . . 5 . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . 6 . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . 7 . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . 8 . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . 9 . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . .10 . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . .11 . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . .12 . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . .13 .

     . . . . . . . . . . . . . . . . . . .

     . . . . . . . . . . . . . . . . . . .

Is the number of consecutive 1's bounded? - Gordon Hamilton, Mar 31 2015

LINKS

James Rayman, Table of n, a(n) for n = 1..10000

James Rayman, Python program

EXAMPLE

a(1) = 1 because the turn (0,0) to (0,1) to (1,2) is clockwise.

a(2) = 1 because the turn (0,1) to (1,2) to (3,2) is clockwise.

a(3) = 1 because the turn (1,2) to (3,2) to (5,1) is clockwise.

a(4) = 1 because the turn (3,2) to (5,1) to (7,-1) is clockwise.

a(5) = 1 because the turn (5,1) to (7,-1) to (7,-4) is clockwise.

At a(6) there is a choice of which direction to go because the change of direction would be the same for both the following:

(7,-1) to (7,-4) to (6,-7)  AND  (7,-1) to (7,-4) to (8,-7).

In the case of a tie we look back to see the direction of the turn in the previous step and since a(5) = 1 we copy that.  So it is the first option that we must choose: (7,-1) to (7,-4) to (6,-7).

a(7) = 1 because the turn (7,-4) to (6,-7) to (4,-10) is clockwise.

a(8) = -1 because the turn (6,-7) to (4,-10) to (4,-14) is counterclockwise.

PROG

(Python) See Rayman link.

CROSSREFS

Cf. A001481.

See A342622 and A342623 for the coordinates of the Wurm.

Cf. A342624, A342625, A342626, A342627.

Sequence in context: A319117 A210245 A210247 * A319116 A337004 A343785

Adjacent sequences:  A256172 A256173 A256174 * A256176 A256177 A256178

KEYWORD

sign,easy

AUTHOR

Gordon Hamilton, Mar 17 2015

EXTENSIONS

Corrected and extended by James Rayman, Jan 19 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 20 00:08 EST 2022. Contains 350467 sequences. (Running on oeis4.)