Ariadne thread sequence

Hello Math-Fun,
Our aim is to produce the lexicographically earliest infinite sequence S of distinct nonnegative integers such that S:
— forms a square spiral of square cells;
— square cells hosting a single digit d (from 0 to 8);
d being the number of square «bricks» inside a cell;
— square brick having 3x3=9 possible positions inside a cell;

4 is the number of bricks inside the cell; they are marked by X.
The thick blue lines are there to materialize the grid – they are not walls

— bricks form impassable walls;
— walls design a kind of labyrinth;
— the labyrinth is crossed by a single path;
— this single path visits all the squares of the spiral (therefore d cannot be 9 – it would block the journey).
Start on the central zero; move from cell to cell like a chess rook (no diagonal steps); unpassable bricks and walls are marked by X; you will visit every square of the grid. 
(The reading direction of the integers is given by the thin yellow arrows) 

We are not interested in the labyrinth itself but in the sequence S [a lot of different labyrinths
can be associated to a sequence — see for instance the three 1’s to the left of the starting zero; the upper one (being the first digit of 12) is inside a cell having only one brick; this brick could occupy any of the 9 possible positions, leaving S as it is].
We have so far:
S = 0, 1, 2, 3, 4, 5, 6, 32, 7, 21, 8, 23, 10, 11, 12, 13, 30, 14, 33, 15, 16, 34, 31, 35, 36, 17, 22, 43, 44, 24, 25, 42, 18, 26, 45, 46, 20, 53, 54, 55, 27, 56, 52, 62, 41, 63, 51, 64, 65, 28, 61, 40, 66, 133, 130, 50, 60, 110, 70, 131, 303, 132, 71,...
 
Question:
Is S really the lexico-first such sequence? (We have a lot of doubts, as «sliding» some bricks from here to there changes everything…)
Best,
É.
____________________
Maximilian H. was quick to correct my sequence (after the yellow 25) — and compute more terms (note that Maximilian's square spiral turns counterclockwise) :
> Sequence =
[0, 1, 2, 3, 4, 5, 6, 32, 7, 21, 8, 23, 10, 11, 12, 13, 30, 14, 33, 15, 16, 34, 31, 35, 36, 17, 22, 43, 42, 24, 25, 44, 18, 26, 45, 46, 20, 53, 54, 55, 27, 56, 52, 62, 41, 63, 51, 64, 65, 28, 61, 40, 50, 66, 60, 303, 120, 110, 70, 101, 304, 230, 71, 203, 111, 112, 72, 130, 305, 100, 306, 333, 233, 334, 37, 132, 335, 323, ...]
  
Grid of size [-18..18] x [-18..18]
(Digits in [.] mean that the corresponding square is also filled with brick.)

Many thanks and bravo, Maximilian!
 

 
 
 
 
 
 
 
 
 

 

Commentaires

  1. Hello Eric! I think instead of 44 you can put a 42 if you put the single X in the outside corner of the box with a 1 that makes up the (inner) corner where 42, then 24, go around.

    RépondreSupprimer
  2. then I get the 44 two steps later, where you have the 42, and then we get the same up to your 66 (after 40) where I get a 50.

    RépondreSupprimer

Enregistrer un commentaire

Posts les plus consultés de ce blog

Beautés ?

Le tripalin se présente

Underline, reproduce