login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of paths of length n+2 originating at a non-corner edge of 4 X 4 Boggle board.
2

%I #7 May 25 2021 02:37:23

%S 5,24,109,435,1512,4621,12463,29565,60596,104542,147032,161759,130777,

%T 68989,17681

%N Number of paths of length n+2 originating at a non-corner edge of 4 X 4 Boggle board.

%C A legal walk on a Boggle board is from one vertex to a vertex adjacent orthogonally or diagonally.

%H Eugene McDonnell, <a href="/A063000/a063000.txt">Remarks on Game of "Boggle"</a>

%F Formula unknown, values computed empirically.

%o (Python)

%o def nn(c): # neighbors of c

%o i, j = divmod(c, 4)

%o N = set((i+io, j+jo) for io in [-1, 0, 1] for jo in [-1, 0, 1]) - {(i, j)}

%o return [4*i+j for i, j in N if 0 <= i < 4 and 0 <= j < 4]

%o def afind():

%o n, paths = 0, {(1, )}

%o while n+2 <= 16:

%o paths1 = set(p + (e, ) for p in paths for e in nn(p[-1]) if e not in p)

%o print(len(paths1), end=", ")

%o n, paths = n+1, paths1

%o afind() # _Michael S. Branicky_, May 24 2021

%Y Cf. A063000, A063002.

%K fini,full,nonn

%O 0,1

%A Eugene McDonnell (EEMcD(AT)AOL.com), Jul 01 2001