login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A331349
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.
2
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, 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, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1
OFFSET
0,2
EXAMPLE
The first values can be found alongside this spiral:
1---2---1---1---2---1---1
| |
1 2---1---1---2---+ 2
| | | |
2 1 1---1---2 2 1
| | | | | |
2 | 2 1---2 | 2
| | | | |
1 1 1---2---2---1 2
| | |
1 2---2-------1-------1
|
2---1---1---2---1---1---2 ...
PROG
(PARI) See Links section.
CROSSREFS
See A331348 for the sequence of values as they are visited.
Sequence in context: A351617 A074293 A013949 * A078880 A000002 A074295
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 14 2020
STATUS
approved