cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A353176 Maximum length of a finite snake in the Snake Number Problem with n-periodic instructions in an infinite square grid (see Comments).

Original entry on oeis.org

30, 79, 152, 450, 241, 257, 1098, 1448, 9520, 8804, 8338, 11348, 25316, 18823
Offset: 5

Views

Author

Rodolfo Kurchan, Apr 28 2022

Keywords

Comments

Given a list of n move instructions (up, right, down, left), the snake starts at the origin and moves according to the instructions, in order. If an instruction tells it to move to a square that has already been visited, the snake skips that instruction. After it has followed (or skipped) the last instruction in the list, it starts again with the first one. The snake is either finite (if it gets stuck at some point) or infinite (if it can go on forever). a(n) is the maximum number of squares visited by a finite snake. For n <= 4, all snakes are infinite. - Pontus von Brömssen, May 08 2022

Examples

			a(5) = 30
URDDL: 30
-- -- 20 21 -- --
-- 18 19 22 23 --
16 17 02 03 24 --
15 14 01 04 25 26
12 13 06 05 30 27
11 10 07 -- 29 28
-- 09 08 -- -- --
.
a(6) = 79
UURDLL: 79
-- -- -- -- -- -- -- 74 75 -- --
-- -- -- -- -- 69 70 73 76 77 --
-- -- -- 64 65 68 71 72 79 78 --
-- -- -- 63 66 67 -- 27 28 -- --
-- -- 61 62 -- 22 23 26 29 30 --
56 57 60 17 18 21 24 25 32 31 --
55 58 59 16 19 20 03 04 33 34 --
54 53 52 15 14 13 02 05 06 35 36
-- -- 51 -- -- 12 01 08 07 38 37
-- -- 50 49 48 11 10 09 40 39 --
-- -- -- -- 47 -- 43 42 41 -- --
-- -- -- -- 46 45 44 -- -- -- --
.
   n | Number of finite solutions | Maximum length | Instructions that give
     |         A352388(n)         |      a(n)      |   the maximum length
  -------------------------------------------------------------------------
   5                    5                  30         URDDL
   6                   21                  79         UURDLL
   7                  127                 152         URULLDD
   8                  618                 450         URURUULD
   9                 2934                 241         URRRRDLRR
  10                13542                 257         URRLDLRRUR
  11                61803                1098         URUURUUULLD
  12               276650                1448         URUULLDUDDDD
  13              1219508                9520         URRRLLDLRRULL
  14              5309179                8804         URRURRRLDLRULL
  15             22868295                8338         UDDRULUUUULLULD
  16             97663066               11348         URRURRRLDDLRUULL
  17            414156142               25316         URRRDLULUUUUULURL
  18           1746438478               18823         UDDDRULULLULLUULDU
Computer solutions a(5) to a(13) found by Giorgio Vecchi.
Computer solutions a(14) to a(18) found by Ariel Futoransky.
		

Crossrefs