%I #9 Dec 15 2021 10:52:52
%S 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1,1,2,2,1,2,1,1,2,1,1,2,1,1,2,
%T 2,1,1,2,1,1,2,1,1,2,2,1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,2,1,1,2,1,
%U 2,2,1,2,1,1,2,2,1,2,2,1,1,2,1,1,2,2,1
%N Fill an infinite square array by following a spiral around the origin; if the square at position (x, y) is empty then set either T(x, y) = 1 or T(x, y) = T(2*x, 2*y) = 2 such that the RUNS transform of the sequence of values as they are chosen equals the sequence of values as they are visited; first choose the value 1. This sequence corresponds to the values as they are chosen.
%H Rémy Sigrist, <a href="/A331349/a331349.gp.txt">PARI program for A331349</a>
%e The first values can be found alongside this spiral:
%e 1---2---1---1---2---1---1
%e | |
%e 1 2---1---1---2---+ 2
%e | | | |
%e 2 1 1---1---2 2 1
%e | | | | | |
%e 2 | 2 1---2 | 2
%e | | | | |
%e 1 1 1---2---2---1 2
%e | | |
%e 1 2---2-------1-------1
%e |
%e 2---1---1---2---1---1---2 ...
%o (PARI) See Links section.
%Y See A331348 for the sequence of values as they are visited.
%K nonn
%O 0,2
%A _Rémy Sigrist_, Jan 14 2020